如何在iPhone中使用WebView网址加载地图视图 [英] How to load Map view using the WebView Url in iphone

查看:118
本文介绍了如何在iPhone中使用WebView网址加载地图视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用UIWebView通过 http://www.google.com/maps?saddr=马萨诸塞州,+ United + States& daddr =森尼韦尔,+ CA,+ United + States .这将导致加载方向视图,而不是使用Direction加载mapview.

I'm loading a mapview using UIWebView by an url like http://www.google.com/maps?saddr=Massachusetts,+United+States&daddr=Sunnyvale,+CA,+United+States. This leads to load a direction view instead of mapview with Direction.

有人可以告诉我如何使用上述网址从源头到目的地加载带有directionLine的mapview吗?

Can any one tell me how to load mapview with directionLine from source to destination using the above url?

推荐答案

只需在链接末尾添加&output=embed:

http://www.google.com/maps?saddr=Massachusetts,+United+States&daddr=Sunnyvale,+CA,+United+States&output=embed

这篇关于如何在iPhone中使用WebView网址加载地图视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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