Create and show a Bing map which you can use to display locations
C#using CI.WSANative.Mapping;
You will need a Bing maps key when you are ready to publish, you can register for one here. For development you can just use an empty string
C#WSANativeMap.CreateMap(new WSAMapSettings()
{
MapServiceToken = "",
HorizontalPlacement = WSAHorizontalPlacement.Centre,
VerticalPlacement = WSAVerticalPlacement.Centre,
Centre = new WSAGeoPoint() { Latitude = 50, Longitude = 0 },
ZoomLevel = 6,
Height = 700,
Width = 700,
InteractionMode = WSAMapInteractionMode.GestureAndControl
});
Centre the map on the specified location and optionally change the zoom level
C#WSANativeMap.CenterMap(new WSAGeoPoint() { Latitude = 60, Longitude = 10 }, 8);
Add a marker to the map with the specified text and optional image. The "MapElementTapped" event is raised if the user taps on it
C#WSANativeMap.AddMapElement("Test", new WSAGeoPoint() { Latitude = 60, Longitude = 10 }, "OptionalImageUri");
C#WSANativeMap.ClearMap();
C#WSANativeMap.DestroyMap();
Launch the built in maps app. You can pass in a query which controls what the map will display, do not include "bingmaps:?" at the start. See the Micosoft docs here for available options
If you are only using this function you do not need to follow the setup steps described below
C#WSANativeMap.LaunchMapsApp("cp=40.726966~-74.006076");
Listen to these events for info about user interactions with the map
C#WSANativeMap.MapTapped
C#WSANativeMap.MapElementTapped