I am trying to add a different number to each of my custom markers. I
found an example code for the default icons in V2, but I'm using
custom markers in V3. Does anyone know if this is possible?
Here is the code I tried to use, but didn't work:
var image = new google.maps.MarkerImage('images/nature_icon-03.png',
new google.maps.Size(24, 37),
new google.maps.Point(0,0),
new google.maps.Point(0, 37));
var shadow = new google.maps.MarkerImage('images/shadow-
nature_icon-03.png',
new google.maps.Size(44, 38),
new google.maps.Point(0,0),
new google.maps.Point(0, 38));
var shape = { coord: [1, 1, 1, 20, 18, 20, 18 , 1], type: 'poly' };
var letter = String.fromCharCode("A".charCodeAt(0) + index);
var letteredIcon = new google.maps.MarkerImage(image);
//letteredIcon.image = "images/nature_icon-03" + letter +
".png";
for (var i = 0; i < nature.length; i++) {
putAdot({
position: new google.maps.LatLng(nature[i][1], nature[i][2]),
shadow: shadow,
icon: letteredIcon,
shape: shape,
title: nature[i][0],
zIndex: nature[i][3],
content: nature[i][4]
});
Here's a link to my working map:
http://s289549208.onlinehome.us/acc/wordpress/map5.html
Any help would be appreciated!
--
You received this message because you are subscribed to the Google Groups
"Google Maps JavaScript API v3" 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-js-api-v3?hl=en.