Search code examples
javascriptgoogle-mapsgoogle-maps-api-2

Display marker on top of other markers on google map


I am looking for javascript code that display marker on top of others.
May be there is any method of GMarker that set marker on top (z-index kind of).

For solution, I destroy marker and created again. The solution works before some time (when I tried this solution) but not right now.


Solution

  • There is a parameter zIndexProcess.

    var marker = new GMarker( latlng, { zIndexProcess: "your z index for marker"  } );
    

    Should work.

    Check this link as well.

    http://econym.org.uk/gmap/zindex.htm