我如何打开Goog​​le地图获取iphone上使用坐标的路线 [英] How do i open Google Maps for directions using coordinates on the iphone

查看:94
本文介绍了我如何打开Goog​​le地图获取iphone上使用坐标的路线的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用UIMapView在iPhone上显示位置。我想做一个从当前位置到感兴趣位置的路线,我不认为它可能使用MapKit(但如果它是请通知),所以我会打开Goog​​le Maps应用程序或Safari浏览器来显示它。



我可以通过指定从(当前位置)到坐标(感兴趣的位置)的坐标来做到这一点,我拥有这些经度和纬度。或者我必须使用街道地址?



如果我必须使用街道地址,我可以从经度和纬度获取它们。

解决方案

可以。使用 MKMapView 获取手机上的位置坐标,并使用两个坐标请求 KML 文件,解析 KML 文件(开发人员站点中的示例应用程序KML查看器),并显示路线....

谢谢

I am using UIMapView to display locations on the iPhone. I want to do a directions from current location to the location of interest, I don't think its possible using MapKit (but if it is please inform) So I will open either the Google Maps application or safari to display it.

Can i do this by specifying co-ordinates from (current location) to co-ordinates (the location of interest) I have these longitudes and latitudes. Or do i have to use street addresses?

If I do have to use street addresses, can i get them from the latitude and longitude.

解决方案

It is possible.Use MKMapView Get the location coordinate where you tapped on the phone and using the two coordinates request the KML file from the google web service ,parse the KML file (sample app KML viewer in developer site) and display the routes....
Thank you

这篇关于我如何打开Goog​​le地图获取iphone上使用坐标的路线的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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