Tag: 这里的API

变换路径/折线对应于地图缩放/移动动作

我正在使用MapLayer和MapOverlay在Map中创建自己的路径/折线,GPS捕获的所有点都存储在一个结构中,以便我可以访问它们。 随时。 现在,我希望路径在用户操纵地图的同时进行变换(缩放和地图重新定位),因此路径仍然连接相同的点。 到目前为止,我的方法非常耗费CPU并且看起来非常糟糕 GeocoordinateList _coordinates; MapLayer pointsLayer; private void MyMap_ZoomLevelChanged(object sender, MapZoomLevelChangedEventArgs e) { repositionPoints(); // This is done other way but for the sake of brevity } private void repositionPathPoints() { try { Polyline path = (Polyline)pointsLayer.First(TrackPath).Content; // retrieves MapOverlay corresponding to line path.Points.Clear(); path.Points = new PointCollection(); foreach (Geocoordinate coord in _coordinates) […]

图像作为地图上的图钉 – Windows Phone 8

我试图将图像添加到Windows Phone 8地图,作为图钉 我的XAML上有以下代码 我的.cs代码如下 public partial class Contactos : PhoneApplicationPage { public Contactos() { InitializeComponent(); Loaded +=Contactos_Loaded; } private void Contactos_Loaded(object sender, RoutedEventArgs e) { UpdateMap(); } private void UpdateMap() { MapOverlay pin = new MapOverlay(); pin.Content = pushRed; pin.GeoCoordinate = new GeoCoordinate(38.57325D, -7.90546); pin.PositionOrigin = new Point(0, 0.5); MapLayer pinLayer = new MapLayer(); […]