Search code examples
c#windows-runtimewindows-store-appsbing-maps

How to use PushpinOffset enumeration in Bing Maps to align Pushpins to coordinate?


I am trying to add Pushpins to Bing Maps using Windows Store (WinRT) API.

In the documentations I see that there is an Enumeration called PushpinOffset but I just cannot find how and where to apply it. I had a look on the Pushpin as well as the Map instance and I couldn't find it any properties where I should add this enum.

This is most likely a rather trivial issue but I would be grateful if someone could show me how to use PushpinOffset enumerations using C#/Bing Maps Store API.

Thank you


Solution

  • Use the MapLayer.SetPositionAnchor method instead to offset the position of your pushpin. For example:

    MapLayer.SetPositionAnchor(pin, new Point(10,10))