Ok - so I think I get it... First you build the custom icon, defning
the points. Then you reference that name in the associative array - -
"new gicon()"
So when you build your markers you can reference the name in your
associative array. I wasn't getting that middle step.. I was thinking
you could reference the name of your icon variable directly - -
Thanks again everyone! - Nick
// Custom Icon 1
var blueIcon = new GIcon();
blueIcon.image = "http://cf.bigfatdesigns.com/clients/natss/
media/images/icon_college.png";
blueIcon.shadow = "http://cf.bigfatdesigns.com/clients/natss/
media/images/icon_shadow.png";
blueIcon.iconSize = new GSize(40, 38);
blueIcon.shadowSize = new GSize(40, 38);
blueIcon.iconAnchor = new GPoint(20, 17);
blueIcon.infoWindowAnchor = new GPoint(15, 15);
blueIcon.infoShadowAnchor = new GPoint(15, 15);
// Custom Icon 2
var homeIcon = new GIcon();
homeIcon.image = "http://cf.bigfatdesigns.com/clients/natss/
media/images/icon_home.png";
homeIcon.shadow = "http://cf.bigfatdesigns.com/clients/natss/
media/images/icon_shadow.png";
homeIcon.iconSize = new GSize(40, 38);
homeIcon.shadowSize = new GSize(40, 38);
homeIcon.iconAnchor = new GPoint(20, 17);
homeIcon.infoWindowAnchor = new GPoint(15, 15);
homeIcon.infoShadowAnchor = new GPoint(15, 15);
// Create some custom icons
// === Create an associative array of GIcons() ===
var gicons = [];
gicons["blueIcon"] = new GIcon(blueIcon, "http://
cf.bigfatdesigns.com/clients/natss/media/images/icon_college.png");
gicons["homeIcon"] = new GIcon(homeIcon, "http://
cf.bigfatdesigns.com/clients/natss/media/images/icon_home.png");
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---