Google Map Marker Z Index. I want to make sure the newest marker stays on top of all other elements in the map. You would just need to create a increment zIndex counter as you add markers and add that to the marker options object: marker=new google.maps. You can use custom SVG vector paths to define the visual appearance of markers. A marker with a high z-index is drawn on top of markers with lower z-indexes. You can set zIndex option for a marker. Google Map Marker Z Index
Google Map Marker Z Index When you fiddle with the z-index on the markers, you're just adjusting them relative to each other. Marker ( position:pin, icon:markerIcon, zIndex: counterValue ); I'm not quite sure what the base start value needs to be. I want to make sure the newest marker stays on top of all other elements in the map.
Marker.getZIndex will return the value of the zIndex property that. you set, if any.
This is where I tried to add it — position: new google.maps.
Google Map Marker Z Index You can set zIndex option for a marker. The anchor property is required in order for the marker to render. The z-index specifies the stack order of this marker, relative to other markers on the map.