maybe like this ?
function giveMeIcon(){
var myIcon = new GIcon(G_DEFAULT_ICON);
myIcon.image = "my_custom_icon.png";
myIcon.iconSize = new GSize(29, 31);
myIcon.shadow = "my_custom_icon_shadow.png";
myIcon.shadowSize = new GSize(42, 31);
myIcon.iconAnchor = new GPoint(10, 29);
myIcon.infoWindowAnchor = new GPoint(10, 14);
myIcon.transparent = "my_custom_icon_transparent.png";
return myIcon
}
function createMarker(point, name, address) {
var myIcon=giveMeIcon;
var marker = new GMarker(point,{icon:myIcon});
var html = '<b>' + name + '</b> <br/>' + address;
GEvent.addListener(marker, 'click', function() {
marker.openInfoWindowHtml(html);
});
return marker;
}
[email protected] je napisao/la:
> Im trying to use custom icons on my map i got it working on a simple
> map shown here http://www.skylabcs.com/store_locator/customicon_end.html
> but i cant get it to work on my store locator here
> http://www.skylabcs.com/store_locator/an_store_locator.html were do i
> put the code on the store locator script.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---