2

I'm writing an android app using v2 of the maps API. I have a couple of different types of markers being displayed on the map, one of which I always want to be shown over the others.

I've tried adding that marker to the map last, but it still seems to end up with other markers being displayed over the top of it depending on the relative position of the markers.

Does anyone have a way of forcing a given marker to always be shown on top?

Pavel Dudka
  • 20,754
  • 7
  • 70
  • 83
yarrichar
  • 423
  • 5
  • 17
  • Hmmmm... polylines and polygons support z-axis ordering, but not markers... – CommonsWare Jan 09 '13 at 23:10
  • Actually I'm not sure this would make sense / look right. Say a marker that was previously obscured by another marker now appears over the top of this marker it's probably going to appear halfway up it, which isnt going to be what you want. Since that other marker is anchored "lower down" the map than the marker which is on top – yarrichar Jan 10 '13 at 21:45
  • Given my comment above - what's the right thing to do - delete this question, or put my previous comment as an answer? – yarrichar Jan 11 '13 at 11:50
  • Since the previous comment does not appear to be an answer, I'd delete the question. – CommonsWare Jan 11 '13 at 12:28
  • possible duplicate of [Google Maps v2 Marker zOrdering - Set to top](http://stackoverflow.com/questions/14771569/google-maps-v2-marker-zordering-set-to-top) – Marian Paździoch Mar 02 '15 at 12:38
  • This has been posted in the gmaps-api-issues tracker. https://code.google.com/p/gmaps-api-issues/issues/detail?id=7762&q=apitype%3DAndroid2&sort=-id%20-introduced&colspec=ID%20Type%20Status%20Introduced%20Fixed%20Summary%20Stars%20ApiType%20Internal very basic functionality missing. Starred the issue for a solution. – Kunta Kinte May 01 '15 at 14:04

1 Answers1

3

The way to bring an item to the front is by calling .showInfoWindow();

Check out this post on how to bring a clicked item to front.

Google Maps v2 Marker zOrdering - Set to top

Community
  • 1
  • 1
Aiden Fry
  • 1,672
  • 3
  • 21
  • 45