I was trying to add a custom icon to the Google map. I am using GIcon
for this. I am able to display the icon, but I want to add dynamic
caption to the icon. Can anybody tell me how to add caption to that.
My code is like this :
var baseIcon = new GIcon(G_DEFAULT_ICON);
baseIcon.shadow = "http://www.google.com/mapfiles/shadow50.png";
baseIcon.iconSize = new GSize(40, 30);
baseIcon.shadowSize = new GSize(37, 34);
baseIcon.iconAnchor = new GPoint(9, 34);
baseIcon.infoWindowAnchor = new GPoint(9, 2);
baseIcon.transparent = "transparent";
var letteredIcon = new GIcon(baseIcon);
letteredIcon.image = "#
{facesContext.externalContext.requestContextPath}/images/google.png";
letteredIcon.label = "abc";
var marker = new GMarker(locLatLng, {icon:letteredIcon,
title:iconTitle });
map.addOverlay(marker);
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---