views:

315

answers:

1

Hey everyone,

Given a GMarker JS variable, how do I obtain the HTML DOM element that represents it? I need this so I can insert a <div> of my own into the map with the correct z-index.

Thanks.

+1  A: 

It looks like the Google Maps API doesn't provide a method to return a marker's DOM element.

Do you just want to create your own custom marker? If so, you can create a marker class which extends GOverlay. MarkerLight is a great example of how to accomplish this (and here is the example page).

If all you need is a custom icon, here is how to do that.

Chris B