From the Google Maps API docs for MarkerOptions:
“All markers are displayed on the map in order of their zIndex, with higher values displaying in front of markers with lower values. By default, markers are displayed according to their vertical position on screen, with lower markers appearing in front of markers further up the screen.”
Example at StackOverflow
gmap3 code to add a flag marker at the next highest level (stored in var ilevel):
{ action: 'addMarker',
latLng: [clat, clng],
marker: {
options: {
zIndex:++ilevel,
icon:"http://code.google.com/intl/fr/apis/maps/documentation/javascript/examples/images/beachflag.png"
}
}
}
