I needed to pass several custom variables to my marker so i could use
them in a function when the marker is clicked.
The marker options are limited so I gave the marker icon a name of
comma separated values which I then use as an array when it's clicked
like:
var nameVar = "value1,value2,value3";
markerOptions.icon.name = nameVar;
marker.addEventListener(MapMouseEvent.CLICK, markerClickEvent);
public static function markerClickEvent(event:MapMouseEvent):void
{
marker = event.target;
var MarkerAR:Array = marker.getOptions().icon.name.toString
().toLowerCase().split(",");
Variable1 = LocationAR[0];
Variable2 = LocationAR[1];
Variable3 = LocationAR[2];
}
I'm not sure if this is the best way to do it but it works well for
me.
anyone else have a different way of doing it?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---