有没有办法使用openURL将徽标放入谷歌地图iPhone应用程序中? [英] Is there a way to place a pin into the google maps iphone app using openURL?

查看:87
本文介绍了有没有办法使用openURL将徽标放入谷歌地图iPhone应用程序中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个iPhone应用程序,可以打开谷歌地图应用程序并在地图上放置一个图钉。



我有针脚的确切位置,由其经度和纬度指定。
我也有一个名字,例如pin 'location 1',它应该和pin一起显示。



我知道UIApplication:openURL可以用于这个,但我不知道确切的url格式。

那么,有没有办法做到我上面描述的?如果是,那么正确的url格式是什么?

解决方案

您可以使用以下格式的URL: http://maps.google.com/maps?q=Your+Location+name@纬度,经度



http://maps.google.com/maps?q=This+is+near+Lake+Shore+Drive@41.9288,-87.6315


I would like to create an iPhone app that can open the google maps app and place a pin on the map.

I have the exact location of the pin, specified by its longitude and latitude. I also have a name for the pin e.g. 'location 1' that should be displayed along with the pin.

I know that UIApplication:openURL can be used for this but I don't know the exact url format.

So, is there a way to do what I described above? If, yes, what is the correct url format?

解决方案

You can use a URL of the format: http://maps.google.com/maps?q=Your+Location+name@latitude,longitude

http://maps.google.com/maps?q=This+is+near+Lake+Shore+Drive@41.9288,-87.6315

这篇关于有没有办法使用openURL将徽标放入谷歌地图iPhone应用程序中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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