Hi Eddie-

It's not possible to assign additional properties to the objects in
the Flash Maps API, so I'd recommend using a "dictionary" data
structure to store them - like an object. Something like:

var polysDict = {"class1": [], "class2": []};

// in function creating polys
var p = new Polygon(...);
p.addEventListener(...);
polysDict["class1"].push(p);

// in function changing polys
for (polyClass in polysDict) {
  for (i = 0; i < polysDict[polyClass].length; i++) {
    // do something with polysDict[polyClass][i]
  }
}

That's approximate code, but hopefully you get the idea.

- pamela
On Thu, Feb 19, 2009 at 2:04 PM, Eddie <[email protected]> wrote:
>
> I'd like to draw 4 polygons on a google map, and assign a class to
> them so I can actions based on mouse rollover/out.  In addition, I'd
> like to reference them so I can change the color on demand.  Is this
> possible?
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API For Flash" 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-for-flash?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to