google.maps.Marker zIndex doesn't work for two icon types - Symbol and String

Viewed 11716

When I add more Markers to Google Map with different icon types like:

...
var marker = new google.maps.Marker({
             position: markerLatLng,
             map: map,
             icon: "http://www.test.com/marker.png",
             zIndex: 10
         });
...

and

...
var resultIcon = {
            path: google.maps.SymbolPath.CIRCLE,
            fillColor: "black",
            strokeColor: "black",
            strokeWeight: 1,
         };

var marker = new google.maps.Marker({
             position: markerLatLng,
             map: map,
             icon: resultIcon,
             zIndex: 5
         });
...

Than the zIndex doesn't work and the Symbol marker appears on the top.

Am I wrong with my code or how can I make the zIndex working?

3 Answers
Related