在Windows Phone 8中启动诺基亚地图 [英] Launch Nokia Maps in Windows Phone 8

查看:85
本文介绍了在Windows Phone 8中启动诺基亚地图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在Windows Phone 8中启动诺基亚地图,但是找不到允许我执行此操作的URI方案.

I want to launch Nokia Maps inside Windows Phone 8 but I can't find the URI scheme which would allow me to do this.

诺基亚地图似乎也没有收听其REST Api或url. (尽管这在Windows Phone中确实有效,但它并未使用诺基亚地图,而是使用了浏览器)

Nokia Maps doesn't seem to listen to their REST Api or url either. (While this does work in Windows Phone, it's not using the Nokia Map it uses the browers)

我的最终目标是弄清楚诺基亚地图可以做的所有事情(从X到Y,以gps坐标为中心,标注位置等),并通过应用启动来访问它们.

My eventual goal is to figure out all the things Nokia Maps can do (X to Y, center on a gps coordinate, label locations, etc), and access them through app launching.

我最初尝试使用bingmaps URI方案:

I originally tried the bingmaps URI scheme:

http://msdn.microsoft.com/zh-我们/library/windows/apps/jj635237.aspx

但是,这没有用,因为Windows Phone 8没有Bing Maps,并且不侦听旧的Bing Maps架构.我确实尝试过"nokiamaps:",但是没有运气:)

However this did not work, as Windows Phone 8 does not have Bing Maps, and does not listen to the old Bing Maps schema. I did try "nokiamaps:" but no luck :)

在Windows Phone 8中,如果您知道URI方案,则启动另一个应用程序非常简单:

In Windows Phone 8 it's pretty trivial to launch another app if you know the URI scheme:

如果我可以找到有关其架构的文档,那就可以了!

If I could find documentation on their schema I'd be set!

您能否解决以下问题:填写空字符串launchNokiaMaps以启动诺基亚地图应用程序.

Can you solve the following problem: Fill in the empty string launchNokiaMaps to launch the Nokia Maps app.

private async void launch()
{
    string launchNokiaMaps = "";
    await Windows.System.Launcher.LaunchUriAsync(new Uri(launchNokiaMaps));
}

推荐答案

经过调查,我发现了Uri:

After investigation, I found the Uri:

private async void launch()
{
    string launchNokiaMaps = "explore-maps://v1.0/?latlon=56.615495,12.1865081&zoom=5";
    await Windows.System.Launcher.LaunchUriAsync(new Uri(launchNokiaMaps));
}

这将使诺基亚Maps应用程序瘫痪.

That will lauch the Nokia Maps app.

但是,您应该注意这一点,因为Windows Phone 8设备上不一定安装了诺基亚地图.例如,HTC设备附带默认的地图"应用.

However you should be careful with that because Nokia Maps is not necessarily installed on Windows Phone 8 devices. For example, HTC devices come with the default "Maps" app.

因此,如果您只想打开默认的Maps应用,则应使用MapsTask.在所有Windows Phone 8设备上都可以使用.

So if you just want to open the default Maps app, you should use the MapsTask. That will work on every Windows Phone 8 device.

这篇关于在Windows Phone 8中启动诺基亚地图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆