Marker labels

4,796 views
Skip to first unread message

Kurteknikk

unread,
Jun 3, 2010, 6:11:24 PM6/3/10
to Google Maps JavaScript API v3
I really need to have labeled markers in this application i'm doing.
My problem is that i'm using API v3 and its a must so i need to have a
solution to have a labeled marker in google maps api v3.

I'm still not sure howcome such simple functionality is not available
by default, like for example apart from title, each marker will just
have a label property which will hold html so it will be easily
styleable using css.

I would like to get more information about this, maybe if there's a
reason why its not included, and at least how can i achieve this
result using gmaps api v3, thanks.

Marc Ridey

unread,
Jun 6, 2010, 12:15:27 AM6/6/10
to google-map...@googlegroups.com

Pil

unread,
Jun 6, 2010, 8:12:23 AM6/6/10
to Google Maps JavaScript API v3


On Jun 6, 6:15 am, Marc Ridey <mri...@google.com> wrote:
> Look at this article:http://blog.mridey.com/2009/09/label-overlay-example-for-google-maps....

Hi Marc,

I thought your labels are more looking like tooltips, so I quickly
made real tooltips out of your code which I will need later on.

http://www.wolfpil.de/tootips.html

The position of the tooltips is just a bit static and only for the
default markers...

Thanks.

Gary Little

unread,
Jun 24, 2010, 1:07:37 AM6/24/10
to Google Maps JavaScript API v3
Check out my new MarkerWithLabel class. You can find a pointer to it
at the bottom of this page:

http://code.google.com/p/google-maps-utility-library-v3/wiki/Libraries

Gary

On Jun 3, 3:11 pm, Kurteknikk <kurtekn...@gmail.com> wrote:
> I really need to havelabeledmarkers in this application i'm doing.
> My problem is that i'm using API v3 and its a must so i need to have a
> solution to have alabeledmarkerin google maps api v3.
>
> I'm still not sure howcome such simple functionality is not available
> by default, like for example apart from title, eachmarkerwill just

BILLYHOYLECHUMP

unread,
Aug 9, 2010, 8:27:19 PM8/9/10
to Google Maps JavaScript API v3
Greetings,

Firebug is issuing the following error when I try to use your class...
this[vb] is not a function

Heres my code:
var marker = new MarkerWithLabel({
position: new google.maps.LatLng(item.lat, item.lon),
map: map,
title: item.name,
shadow: new google.maps.MarkerImage("/media/image/vendor/map/marker-
shadow.png",new google.maps.Size(65,78)),
icon: new google.maps.MarkerImage("/media/image/vendor/map/
marker-"+item.rootInt+".png",new google.maps.Size(65,78)),
labelContent: "4",
labelAnchor: new google.maps.Point(3, 30),
labelClass: "labels",
labelInBackground: false
});

I'm at a loss. Any help is appreciated.

BILLYHOYLECHUMP

unread,
Aug 10, 2010, 12:05:57 PM8/10/10
to Google Maps JavaScript API v3
Christ! It would help if I loaded google maps before loading in your
class. Amateur move.
Reply all
Reply to author
Forward
0 new messages