In my app I have some objects that have their location displayed on the map using markers. The problem is that the only way I\'ve found to handle marker clicks is
I reckon this callback was not very thoroughly though by the Android team, but, it's what we have.
Whenever you call mMap.addMarker();
it returns the generated marker. You can then use a HashMap or some other data holder structure to remember it.
// Create the hash map on the beginning
WeakHashMap haspMap = new WeakHashMap ();
// whenever adding your marker
Marker m = mMap.addMarker(new MarkerOptions().position(lat, lng).title("Hello World").icon(icon_bmp));
haspMap.put(m, your_data);