views:

71

answers:

1

I use Google Maps JavaScript Version 3 and JQuery.

How do I create a complex marker similar to these:

sample complex marker

or

sample complex marker with text

Label and image separate:

label and image separate

Please excuse my funny English.

+1  A: 

Have a look at this:

http://groups.google.com/group/Google-Maps-API/web/examples-tutorials-custom-icons-for-markers

and at this example:

http://code.google.com/apis/maps/documentation/javascript/examples/icon-complex.html

amercader
Thank you.I can do this with google Maps API?:<code><div class="my_marker" style="background-image: url(/i/label.png);"> <img src="/f/prew_id123.jpg"/> <srong>Place name</strong></div></code>
Dima K
Is it possible to put in a marker some code?
Dima K
I don't think you can actually insert code in the marker itself. You have to customize it via GMarker, GMarkerOptions and GIcon classes.Have a look at the source of the example I added to the answer.
amercader
GMarker is a v2 object. He is using v3
Cannonade
@Cannonade: You are absolutely right, the classes to use in this case are Marker, MarkerOptions and MarkerImage
amercader