1.加一个标记:
加标记,是地图中最常用的方法。它和bing map又有所不同,首先所在的命名空间不同;其次显示方式不同;但总之都是可以在模拟上运行的。
Pushpinpin =newPushpin();
pin.Location =newGeoCoordinate(30.259497, 120.129798);
pin.Width = 200;
pin.Height = 200;
pin.Content ="test";
pin.Background =newSolidColorBrush(Colors.Red);
Map控件显示的标记
bing map控件显示的标记
2.绘制多边型区域:
MapPolygonpolygon =newMapPolygon();
polygon.Locations =newLocationCollection() {newGeoCoordinate(30.259497, 120.129798),
newGeoCoordinate(30.359497, 120.329998),
newGeoCoordinate(30.379497, 120.529798),
newGeoCoordinate(30.389497, 120.729798) };
3.绘制多边线:
MapPolylinepolyline =newMapPolyline();
polyline.Stroke =newSolidColorBrush(Colors.Red);
polyline.Locations =newLocationCollection() {
newGeoCoordinate(30.259497, 120.129798),
newGeoCoordinate(30.289497, 120.120998)
};
4.在地图上增加图片:
MapLayerimagelayer =newMapLayer();
imagelayer.AddChild(image,newGeoCoordinate(30.259497, 120.129798),PositionOrigin.BottomLeft);