Position mapicon below mapcontrol center

不问归期 提交于 2019-12-13 06:08:03

问题


please I need help with positioning of the mapicon below the mapcontrol.center point like this screenshot here http://www.windowsphone.com/en-us/store/app/sygic-gps-navigation-maps-poi-route-directions/340f7b71-86bc-4f99-8c59-d4a6126c10b1


回答1:


Use NormalizedAnchorPoint property of the MapIcon class. It takes a Point, with x and y ranging from 0 to 1.
Based on your screenshot (3rd one), you should use a value of (0.5, 1).

MapIcon icon = new MapIcon();
icon.NormalizedAnchorPoint = new Point(0.5, 1);



回答2:


I choose a different option by using 'RenderTransform' which enable me to extend the 'MapControl' below the bottom of the page and thereby moving the 'MapIcon' and MapControl center closer to the bottom of the page just as i wanted. Its not clean but it worked.



来源:https://stackoverflow.com/questions/29808480/position-mapicon-below-mapcontrol-center

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!