SetAnchor for MapOverlay

In map management [wp8], I used mapoverlay to build GeoCoordinate. The problem I am facing is that when zooming in and out, the overlays move from this place to another place. Is there a way to snap it to that particular position, like the "SetAnchor" property used to pin a button. I tried the PostionOrigin property without getting the desired result. Thanks in advance...

+4
source share
1 answer

Try something similar

var containerCanvas = new Canvas { Height = 100, Width = 100 }; _dragMarker = new MapOverlay(); var dragMarkerLayer = new MapLayer(); var image = new Image { Source = DContext != null ? new BitmapImage(new Uri(DContext.DragImagePath, UriKind.RelativeOrAbsolute)) : new BitmapImage(), Height = 100, Width = 100, }; containerCanvas.Children.Add(image); _dragMarker.Content = containerCanvas; _dragMarker.PositionOrigin = new Point(0.5, 0.75); 

This works great for me ... :)

+2
source

Source: https://habr.com/ru/post/1498974/


All Articles