我的wp8应用动态创建地图对象并添加与MapOverlays的协调。我需要为每个位置提供工具提示,以便能够显示地名并通过点击工具箱内的文本或按钮导航到网页。有一些静态图钉的例子,但我找不到一个用mapoverlay做到这一点的例子。你能帮我吗?
Image pinIMG2 = new Image();
pinIMG2.Source = new System.Windows.Media.Imaging.BitmapImage(new Uri("pin2.png", UriKind.Relative));
pinIMG2.Stretch = System.Windows.Media.Stretch.None;
MapOverlay myLocationOverlay = new MapOverlay();
myLocationOverlay.Content = pinIMG2;
myLocationOverlay.PositionOrigin = new Point(0.5, 0.5);
myLocationOverlay.GeoCoordinate = new GeoCoordinate(57.724611, 12.938945);
MapLayer myLocationLayer = new MapLayer();
myLocationLayer.Add(myLocationOverlay);
MyMap.Layers.Add(myLocationLayer);