【问题标题】:Windows Store app crash when adding Bing maps to the page将 Bing 地图添加到页面时 Windows 应用商店应用程序崩溃
【发布时间】:2014-09-28 03:18:27
【问题描述】:

我在我的 VS 2013 上创建了新的通用应用程序(中心模板),并按照这篇关于将 Bing 地图添加到我的应用程序的文章: http://msdn.microsoft.com/en-us/library/hh855146.aspx

我的 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>

应用程序在启动时崩溃并出现此原生异常:

Unhandled exception at 0x76ECB152 (combase.dll) in HubApp1.Windows.exe: 0xC000027B: An application-internal exception has occurred (parameters: 0x002ED480, 0x00000002).

如果没有 Bing 地图控制,应用当然不会崩溃... 有谁知道是什么问题?我只是想做一些简单的事情。

【问题讨论】:

    标签: c# windows-8.1 bing-maps win-universal-app


    【解决方案1】:

    必应地图控件仅适用于 Windows 8/8.1 应用程序。要在通用应用程序中使用地图,请查看这篇博文:http://rbrundritt.wordpress.com/2014/06/24/how-to-make-use-of-maps-in-universal-apps/

    要检查的另一件事是,您已在配置管理器中将活动解决方案平台从 Any-CPU 更改为 x86 或 x64。 Bing Maps 控件使用 C++ 运行时,这要求您针对特定平台构建项目,而不是使用 Any-CPU 设置。您可以在此处找到相关文档:http://msdn.microsoft.com/en-us/library/dn456475.aspx

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-02-22
      • 2017-10-11
      • 1970-01-01
      • 2019-12-17
      • 2016-05-04
      • 1970-01-01
      • 2016-03-12
      相关资源
      最近更新 更多