我如何添加一个按钮,谷歌在iOS地图标记信息的窗口? [英] How can i add a button to google maps marker info window on ios?

查看:383
本文介绍了我如何添加一个按钮,谷歌在iOS地图标记信息的窗口?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我加入谷歌地图SDK的ios我的iPhone应用程序,和我有一些自定义的标记,如果点击信息窗口标题弹出,我怎么能添加一个按钮,这个信息窗口,所以如果pressed会去新的一页?现在我已经tryed使用这篇文章来解决这个问题,<一个href=\"http://stackoverflow.com/questions/15360483/adding-click-event-on-infowindow-marker-in-google-maps-sdk-for-native-ios-object\">Adding Click事件在信息窗口/标记在谷歌地图SDK机iOS /目标C 它不给我的错误,但它不会工作。

I have added Google maps sdk for ios to my Iphone app, and i have some custom markers if clicked info window pops up with title, how can i add a button to this info window so if pressed will go to new page? Now i have tryed to use this post to solve this issue Adding Click Event on InfoWindow/Marker in Google Maps SDK for native iOS/objective C it doesnt give me error but it won't work.

这就是我想要我的结果是: http://www.flickr .COM /照片/ 74719051 @ N05 / 6728157477 /

this is what i want my result to be:http://www.flickr.com/photos/74719051@N05/6728157477/

推荐答案

为你链接显示code使用MapKit,所以它不会与谷歌地图SDK适用于iOS的工作问题的答案。

The answer for the question you linked shows code for using MapKit, so it wouldn't work with the Google Maps SDK for iOS.

请参阅如何使用谷歌地图SDK适用于iOS返回一个自定义视图这样的问题:

See this question for how to return a custom view with the Google Maps SDK for iOS:

在自定义标注视图谷歌地图SDK

不过请注意,根据这个问题,它看起来像显示的内容可能是视图的视觉副本不是实际来看,这可能会限制你的观点做互动:

However note that according to this question, it looks like what is displayed might be a visual copy of the view not the actual view, which might limit the interaction you can do with the view:

<一个href=\"http://stackoverflow.com/questions/15213049/add-buttons-to-view-returned-by-markerinfowindow-delegate-method\">Add按钮来查看由markerInfoWindow委托方法返回

只要检测信息窗口的水龙头,去到不同的页面应该使用能够 didTapWindowOfMarker 虽然。

Simply detecting a tap on the info window and going to a different page should be possible using didTapWindowOfMarker though.

请注意,有一个在谷歌的问题跟踪功能请求添加为这个直接支持:

Note that there's a feature request in Google's issue tracker to add direct support for this:

<一个href=\"https://$c$c.google.com/p/gmaps-api-issues/issues/detail?id=4961\">https://$c$c.google.com/p/gmaps-api-issues/issues/detail?id=4961

这篇关于我如何添加一个按钮,谷歌在iOS地图标记信息的窗口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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