Reputation: 11
I have an Android app that displays multiple markers on a Google Map (using the Google Android APIs). When multiple markers overlap each other, I want the one a user clicks on to be brought to the front (think zIndex) but I haven't found a way to do this in Android.
Is there a simple way to force a selected marker to be brought to the front of the map? Or do I need to create a new overlay with just the single selected marker and place it on top of the overlay that has all the other markers?
Or do I need to reorder the overlays in my list and then force a redraw of all the markers?
Upvotes: 1
Views: 2157
Reputation: 21343
zIndex in Google Map I think is simply done by the ordering of the overlays per the documentation.
To achieve your functionality, create a new single overlay containing only the clicked item. Basically you will just move from the original overlay to this one.
Steps:
Upvotes: 2