Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I pass custom data to Google Maps v2 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.

like image 638
Jim Hankins Avatar asked Dec 25 '12 23:12

Jim Hankins


1 Answers

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!

like image 133
dumazy Avatar answered Sep 21 '22 15:09

dumazy