How to load Map view using the WebView Url in iphone

大城市里の小女人 提交于 2019-12-04 05:06:51

问题


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.

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


回答1:


Just add &output=embed at the end of your link:

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


来源:https://stackoverflow.com/questions/6248501/how-to-load-map-view-using-the-webview-url-in-iphone

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!