I would like to display a text label next to the markers on google maps. I've used Virtual Earth before and I'm just starting to use Google Maps. I tried setting the Title property but that only changes the roll over text.

Is there a way to display a small line of text underneath a marker that will stay there as the user zooms, pans and uses the map?

The ELabel class you pointed me to works pretty well. Amazing Google Maps site btw, don't know how I didn't find it in my original searches. Thanks!
–
Great TurtleJun 30 '09 at 0:58

3

That's handy, though it doesn't work with v3 of the Google Maps JavaScript API. Also, if you zoom out far enough, then the labels overlap into an unreadable soup. Still, the best offering I've found so far.
–
Drew NoakesOct 7 '10 at 21:17

Version 1.1.1 of MarkerWithLabel has been released with some fixes.
–
Drew NoakesJan 22 '11 at 22:34

For an example of this API in use, check out a website I developed (keep zooming in on the map and you will see markers first, then labels as you zoom further): diveseven.com/atlas
–
Drew NoakesJun 17 '11 at 16:11

Good one..But it is very slow as compared to regular Markers, when the number of markers in some Thousands.. Is there any alternate to this problem ? @Drew Noakes.
–
Pravin KumarNov 29 '12 at 10:55

1

@PravinKumar, I am not aware of any. I haven't hit any performance problems, but then I'm not trying to draw that many markers. I'm not sure how much I'd like to look at a map with thousands of dots on it, but of course it depends. When I've had that many data points, I've turned to clustering to convey the information to viewers, and only use markers when zoomed in enough to have a sensible number of them on screen.
–
Drew NoakesDec 23 '12 at 13:46

If you just want to show label below the marker, then you can extend google maps Marker to add a setter method for label and you can define the label object by extending google maps overlayView like this..