I created new Universal app (Hub Template) on my VS 2013, and followed this article about adding Bing maps to my app: http://msdn.microsoft.com/en-us/library/hh855146.aspx
my xaml:
<Page
x:Name="pageRoot"
x:Class="HubApp1.HubPage"
DataContext="{Binding DefaultViewModel, RelativeSource={RelativeSource Self}}"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:HubApp1"
xmlns:data="using:HubApp1.Data"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:bm="using:Bing.Maps"
mc:Ignorable="d">
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<bm:Map x:Name="myMap" Credentials="MY_SHARD_KEY" ></bm:Map>
</Grid>
the app crashs on the launch with this native exception:
Unhandled exception at 0x76ECB152 (combase.dll) in HubApp1.Windows.exe: 0xC000027B: An application-internal exception has occurred (parameters: 0x002ED480, 0x00000002).
Without the Bing Maps control of course the app don't crash... Anyone knows what the problem? I just wanted to do somthing simple.
The Bing Maps control only works in Windows 8/8.1 apps. To use maps in universal apps take a look at this blog post: http://rbrundritt.wordpress.com/2014/06/24/how-to-make-use-of-maps-in-universal-apps/
Another thing to check is that you have changed the active solution platform from Any-CPU to x86 or x64 in configuration manager. The Bing Maps control makes use of the C++ runtime and that requires that you build the project against specific platforms rather than using the Any-CPU setting. You can find documentation on this here: http://msdn.microsoft.com/en-us/library/dn456475.aspx
User contributions licensed under CC BY-SA 3.0