Everyone has been so helpful, and all of those links have seemed to
offer many wonderful things, and I have tried a lot of them, and
nothing works.


I have tried
// Create a base icon for all of our markers that specifies the
// shadow, icon dimensions, etc.
var baseIcon = new GIcon(G_DEFAULT_ICON, *******);
baseIcon.shadow = "http://www.google.com/mapfiles/shadow50.png";;
baseIcon.iconSize = new GSize(20, 34);
baseIcon.shadowSize = new GSize(37, 34);
baseIcon.iconAnchor = new GPoint(9, 34);
baseIcon.infoWindowAnchor = new GPoint(9, 2);

// Creates a marker whose info window displays the letter
corresponding
// to the given index.
function createMarker(point, index) {
  // Create a lettered icon for this point using our icon class
  var letter = String.fromCharCode("A".charCodeAt(0) + index);
  var letteredIcon = new GIcon(baseIcon);
  letteredIcon.image = "http://www.google.com/mapfiles/marker"; +
letter + ".png";

  // Set up our GMarkerOptions object
  markerOptions = { icon:letteredIcon };
  var marker = new GMarker(point, markerOptions);

  GEvent.addListener(marker, "click", function() {
    marker.openInfoWindowHtml("Marker <b>" + letter + "</b>");
  });
  return marker;
}

var point = new GLatLng(33.378135,-111.978349);
var marker = createMarker(point, 1)
map.addOverlay(marker, 1);

var point = new GLatLng(33.375135,-111.977743);
var marker = createMarker(point, 2)
map.addOverlay(marker, 2);

// Add 10 markers to the map at random locations
var bounds = map.getBounds();
var southWest = bounds.getSouthWest();
var northEast = bounds.getNorthEast();
var lngSpan = northEast.lng() - southWest.lng();
var latSpan = northEast.lat() - southWest.lat();
for (var i = 0; i < 10; i++) {
  var latlng = new GLatLng(southWest.lat() + latSpan * Math.random(),
    southWest.lng() + lngSpan * Math.random());
  map.addOverlay(createMarker(latlng, i));
}


where ******* is
"icons/marker.png"  a slightly plumper, redder icon
"icons/marker_0.png"  the above with a 0 in it
"icons/green.png" a green icon
"http://maps.google.com/mapfiles/ms/icons/blue.png"; a blue icon
"http://maps.google.com/mapfiles/ms/icons/green.png"; a green icon
and several others, and http://phoenix.apcug.org/test.htm still shows
the same default icon

The code was successful in using some other icons like the knife and
fork and the schoolhouse from Google Maps, but when I did the random
10 icons with A, B, C, D, etc they are always the same thing.

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to