Reputation: 869
am trying to build an map application using bing on windows 8.1 ,but the result is
xaml code
<Page
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:BingMapsWindowsStoreApp"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:Maps="using:Bing.Maps"
x:Class="BingMapsWindowsStoreApp.MainPage"
mc:Ignorable="d">
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Maps:Map x:Name="myMap" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Credentials="AjeEXq9FGVKMaLZHTMZNRisDaCsToKEncpKIHbd"/>
</Grid>
Upvotes: 4
Views: 1022
Reputation: 586
You can make the change in code as below. Also, I did notice when altering the code to change the region from an unsupported one to the US, occasionally there was a hiccup and the map wouldn't update. Running it a second time seems to do the trick though.
// CHANGE MAP REGION
switch (myMap.HomeRegion)
{
case "AR": // ARGENTINA
case "AZ": // AZERBAIJAN
case "KR": // SOUTH KOREA
case "CN": // CHINA
case "IN": // INDIA
case "MA": // MOROCCO
case "PK": // PAKISTAN
case "SG": // SINGAPORE
case "RS": // SERBIA
case "VE": // VENEZUELA
case "TW": // TAIWAN
case "HK": // HONG KONG
myMap.HomeRegion = "US";
break;
}
Upvotes: 0
Reputation: 15296
The user region settings of your computer might be set to one of these:
Bing Maps is not supported in these regions. To overcome this, either set HomeRegion="US"
in <Maps:Map .... />
or go to Control-Panel > Clock, Language and Region > Change Location. Set Home Location to United States. Also try with latest version of SDK.
Upvotes: 6