2

是否可以在 WPF bing 地图中将文本添加到指定位置(纬度/经度)?

4

1 回答 1

3

是的,我会假设 c# 代码隐藏?

// I just created a Location object from the mouseclick but you can replace labelLocation with anything
Microsoft.Maps.MapControl.WPF.Location labelLocation = myMap.ViewportPointToLocation(mousePosition);

// Create a label
Label customLabel = new Label();
customLabel.Content = "Text here";
// With map layers we can add WPF children to lat long (WPF Location obj) on the map.
MapLayer labelLayer = new MapLayer();
labelLayer.AddChild(customLabel, labelLocation );
myMap.Children.Add(labelLayer);
于 2013-07-06T05:17:29.350 回答