有没有办法在 Windows Phone 7 上打开 Bing 地图应用程序到特定位置? [英] Is there a way to open the Bing Maps App on Windows Phone 7 to a specific location?

查看:25
本文介绍了有没有办法在 Windows Phone 7 上打开 Bing 地图应用程序到特定位置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

WP7 工具的内置模拟器没有安装必应应用程序,我也没有任何手机硬件可以测试.所以我只是想知道,如何将 Bing 地图应用程序打开到特定的纬度/经度?

The built-in emulator from the WP7 Tools doesn't have the Bing App installed, and I don't have any phone hardware to test with. So I'm simply wondering, how can I open the Bing Maps Application to a specific Lat/Long?

相关问题:

iPhone -- 如何从我自己的本机应用程序中启动 Google Maps iPhone 应用程序?

Android -- https://developer.android.com/指南/附录/g-app-intents.html

Android -- https://developer.android.com/guide/appendix/g-app-intents.html

推荐答案

很遗憾,无法从您自己的应用程序中启动 Bing 地图应用程序.
在早期的 CTP 中有一种方法,但已被删除.希望它会在未来回归,但它不在任何当前的、公开的路线图上.

Unfortunately there is no way to launch the Bing Maps App from within your own application.
In an early CTP there was a way but this has been removed. Hopefully it will return in the future but it is not on any current, public, roadmaps.

这留下了两种选择.

选项 1
您可以执行搜索 表示您要显示的纬度/经度.搜索应用程序确实直接与 bing 地图应用程序集成,因此,假设 bing 可以采用您提供的经纬度并返回有用的东西,用户仍然可以在 bing 地图应用程序中做他们想做的任何事情.

Option 1
You could perform a search for the lat/long you want to show. The search app does directly integrate with the bing maps app so, assuming that bing can take the lat/long you provide and return something useful, the user would still be able to do whatever they wished within the bing maps app.

这有两个缺点.首先,您无法控制搜索结果.其次,您无法在模拟器上对此进行测试.

This has 2 downsides though. Firstly, you have no control over the search results. And, secondly, you cannot test this on the emulator.

选项 2
您可以在自己的内部使用 BingMaps 控件Silverlight 应用程序.
(在 RTM 之前,可以使用完整的您的应用中控件的 Silverlight 版本.但是,这有一些怪癖,并且只是作为一种临时解决方案.)
虽然功能不如应用那么齐全,但该控件确实提供了很多功能.

Option 2
You could use the BingMaps control within your own silverlight application.
(Prior to the RTM, it was posible to use the full Silverlight version of the control within your app. But, this had a few quirks and was only ever intended as a stop gap solution.)
While not as fully featured as the app, the control does offer a lot of functionality.

没有真实设备,但您可以使用 反应式扩展.
即使使用真实设备,您也可能希望考虑这样做,因为这比在步行或开车时尝试调试要容易得多.

Without a real device, but you could simulate location data, for testing, with the Reactive Extensions.
Even with a real device you will probably want to look at doing this as it's a lot easier than trying to debug while walking or driving around.


根据 这篇文章作者:Kevin Marshall,如果您要使用 WebBrowserTask()(上面的选项 1),请使用maps:"作为查询前缀,并对查询字符串进行 URL 编码.例如:


As per this post by Kevin Marshall, if you're going to use the WebBrowserTask() (option 1 above) prefix your query with "maps:" and URL encode your query string. eg:

var task = new WebBrowserTask(); 
task.URL = "maps:1%20N%20Franklin%2060606";

task.URL = "maps:37.788153%2C-122.440162";

这篇关于有没有办法在 Windows Phone 7 上打开 Bing 地图应用程序到特定位置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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