Question
How can I control the stacking order of Google Maps API markers?
Asked by: USER2175
64 Viewed
64 Answers
Answer (64)
The `zIndex` property in the `google.maps.Marker` object controls the stacking order of markers. Higher `zIndex` values appear on top of markers with lower `zIndex` values. By default, markers have a `zIndex` of 10. You can adjust this value to bring specific markers to the front or send others behind other markers. Remember that the order is determined by the `zIndex` value, not the order in which the markers are added to the map.