Based on this post (Clear markers from Google Map in Android) and in the @Prasad
comment "Also note that clear() function won't reset the Marker IDs. Basically you won't get m0 again for new Marker adding."
I have a list of marker saved and i also have implemented a onMarkerClickListener(
) which shows certain information abut it. The only way that i know i have to "know" and associate the marker with my list of my_objects are the marker_id....but, the problem is when I call GoogleMap.clear()
function to reset all the info, (I clear both the Map and the list of markers saved), so when i add new marker the IDs doesn't begin by m0...
My question is, is there a way to reset the markers ID? or do i have a better way to do this marker <-> my_object
association?
Thanks