【发布时间】:2015-06-12 10:00:56
【问题描述】:
我有两种图标,公交车站和交通图标,如何去除公交车站图标?
我的设置功能图标
public void SetStopIcon(double Latitude, double Longitude, MapControl map) //48.463443, 35.057952
{
Image iconStopBus = new Image();
iconStopBus.Source = new BitmapImage(new Uri("ms-appx:///Assets/Logo.scale-240.png"));
map.Children.Add(iconStopBus);
MapControl.SetLocation(iconStopBus, new Geopoint(new BasicGeoposition() { Latitude = Latitude, Longitude = Longitude }));
MapControl.SetNormalizedAnchorPoint(iconStopBus, new Point(0.5, 0.5));
}
public void SetBusIcon(double Latitude, double Longitude, MapControl map) //48.463443, 35.057952
{
Image iconBus = new Image();
iconBus.Source = new BitmapImage(new Uri("ms-appx:///Assets/2.busIcon.white.png"));
map.Children.Add(iconBus);
MapControl.SetLocation(iconBus, new Geopoint(new BasicGeoposition() { Latitude = Latitude, Longitude = Longitude }));
MapControl.SetNormalizedAnchorPoint(iconBus, new Point(0.5, 0.5));
}
感谢您的回复!
【问题讨论】:
-
为每个
Image添加某种Tag,然后循环遍历地图的子元素并删除任何具有与您要删除的标签匹配的标签的框架元素。 -
你能举个简单的例子吗?
标签: c# windows-phone-8 windows-phone-8.1 here-api