简体   繁体   English

bing 在 iphone 中映射路线

[英]bing maps routes in iphone

how can i use bing maps to draw a route line between two points.我如何使用 bing 地图在两点之间绘制路线。 i can do that by calling url like: http://www.bing.com/maps/default.aspx?v=2&lvl=10&dir=0&sty=r&rtp=pos.16.955542_54.73933~pos.17.002046_54.049973 i can do that by calling url like: http://www.bing.com/maps/default.aspx?v=2&lvl=10&dir=0&sty=r&rtp=pos.16.955542_54.73933~pos.17.002046_54.049973

but those urls are not accessible from iphone uiwebview.但无法从 iphone uiwebview 访问这些网址。 bing is showing its main page instead. bing 正在显示其主页。

i tried the bing ios sdk but could not find the way to do this.我尝试了 bing ios sdk 但找不到这样做的方法。

If you're still going down the webview route - I'd suggest trying it again, as support for redirecting desktop URLs to mobile equivalents might have been added since.如果您仍在走 webview 路线 - 我建议再试一次,因为可能已经添加了对将桌面 URL 重定向到移动等效项的支持。

As long as the right user agent is associated with the request to identify the device as an iPhone, the URL above should get rewritten to something like:只要正确的用户代理与将设备识别为 iPhone 的请求相关联,上面的 URL 就应该被重写为:

http://m.bing.com/maps/default.aspx?v=2&lvl=10&dir=0&sty=r&rtp=pos.16.955542_54.73933~pos.17.002046_54.049973&mid=10006 http://m.bing.com/maps/default.aspx?v=2&lvl=10&dir=0&sty=r&rtp=pos.16.955542_54.73933~pos.17.002046_54.049973&mid=10006

and load the mobile directions experience.并加载移动路线体验。

Alternatively, go to m.bing.com and follow the directions link and retrieve the mobile-specific URL pattern you're interested in, which doesn't rely on redirecting desktop URLs... example:或者,go 到 m.bing.com 并按照说明链接并检索您感兴趣的特定于移动设备的 URL 模式,它不依赖于重定向的桌面 URL...

http://m.bing.com/directions#/Maps?w=a.seattle~a.san%20francisco&ul=47.60336588,-122.02145731&mode=1 http://m.bing.com/directions#/Maps?w=a.seattle~a.san%20francisco&ul=47.60336588,-122.02145731&mode=1

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM