I'm trying to use the MapControl control in a UWP App.
I've followed this tutorial: https://msdn.microsoft.com/en-us/windows/uwp/maps-and-location/display-maps#mapconfig
But my map shows an empty blue map:
This is the XAML Code:
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Maps:MapControl
x:Name="MapControl1"
ZoomInteractionMode="GestureAndControl"
TiltInteractionMode="GestureAndControl"
MapServiceToken="bSRPuDBxuLhlpg8bpeWO~wEhCZkvxi-GBzWNNSUH1bA~ApmPFjGTrAZSSS6M6SdEa5lA...moremoremore..."/>
</Grid>
This is the .cs Code:
protected override void OnNavigatedTo(NavigationEventArgs e)
{
// Specify a known location.
BasicGeoposition cityPosition = new BasicGeoposition() { Latitude = 47.604, Longitude = -122.329 };
Geopoint cityCenter = new Geopoint(cityPosition);
// Set the map location.
MapControl1.Center = cityCenter;
MapControl1.ZoomLevel = 12;
MapControl1.LandmarksVisible = true;
}
I think the MapServiceToken should be right, because if I change any MapServiceToken character the map display "Warning: MapServiceToken not specified" (and if I put it correctly it doesn't), and also, if I look "usage" in BingsMapsPortal the key has been used, as you can see in next image:
I have tried also create another Tokens and use them with the same result.
Besides, I have tried use the MapServiceToken in "MapControl" sample project in GitHub (https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/MapControl ), with the same result.
Any idea why i'm not able to load any Bing map in ControlMap control?
EDIT: Here is the code, if you want test it: DRIVE LINK
Thx!