如何将自定义数据传递到Google Maps v2 InfoWindowAdapter? [英] How do I pass custom data to Google Maps v2 InfoWindowAdapter?
问题描述
我试图利用InfoWindowAdapter为InfoView提供自定义内容.我正在从Web服务中提取JSONArray并添加标记,但是我没有看到如何通过标记将详细信息传递给回叫.
@Override
public View getInfoWindow(Marker marker)
在Javascript API中,我可以设置任意标记信息.我希望能够传递可用作自定义内容的条件的信息,例如marker.status字符串.因此,除了标题等以外,其他视图也需要传递一些自定义字段.
也许尝试将您的信息或对象添加到标记中,如下所述: http://bon-app-etit .blogspot.be/2012/12/add-informationobject-to-marker-in.html
我还发表了一篇文章,该文章继续了以前的文章,以使用InfoWindowAdapter. 在这里中查看!>
I am trying to take advantage of an InfoWindowAdapter to provide custom content for the InfoView. I'm pulling down a JSONArray from my web service and adding the Markers but I'm not seeing how to pass the detail to the call back via a Marker.
@Override
public View getInfoWindow(Marker marker)
In the Javascript API I was able to just set arbitrary marker info. I want to be able to pass info that can be used as conditionals for the custom content, example a marker.status string. So something other than title etc. The view will need a number of custom fields I need to pass in.
perhaps try adding your info or object to the marker as explained here: http://bon-app-etit.blogspot.be/2012/12/add-informationobject-to-marker-in.html
Edit: I also made a post that continues the previous to use the InfoWindowAdapter. Check it out here!
这篇关于如何将自定义数据传递到Google Maps v2 InfoWindowAdapter?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!