本文介绍了地图上的PushPins锚定不正确的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我添加的每个Pushpin都会发生这种情况。似乎Pushpins的左上角有锚点,尽管实际指针位于左下角。我在这个主题上发现的每个建议都不适用于WP8
This happens with every Pushpin that i add. It seems that Pushpins have their anchorpoint in the top left, despite having the actual pointer in the bottom left. Every suggestion I found on this topic is not applicable to WP8
以下是我添加引脚的方法:
Here is how I add the pin:
MapLayer l = new MapLayer();
Pushpin p = new Pushpin();
p.Content = b.Name;
p.GeoCoordinate = new System.Device.Location.GeoCoordinate(b.Latitude, b.Longitude);
MapOverlay o = new MapOverlay();
o.Content = p;
o.GeoCoordinate = new System.Device.Location.GeoCoordinate(b.Latitude, b.Longitude);
l.Add(o);
DetailMap.Layers.Add(l);
推荐答案
o.PositionOrigin = new Point(0.0, 1.0);
这篇关于地图上的PushPins锚定不正确的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!