Hello everyone,
When I create a marker on the map through the function:
// -- BEGINNING OF CODE -- //
// The function that processes the address
function doGeocode (event:Event) : void
{
var geocoder:ClientGeocoder = new ClientGeocoder();
geocoder.addEventListener(
GeocodingEvent.GEOCODING_SUCCESS,
function(event:GeocodingEvent):void {
var placemarks:Array = event.response.placemarks;
if (placemarks.length > 0) {
map.setCenter(placemarks[0].point);
marker = new Marker(placemarks[0].point);
marker.addEventListener(MapMouseEvent.CLICK, function
(event:MapMouseEvent):void {
marker.openInfoWindow(new InfoWindowOptions( {content:
placemarks[0].address }));
});
map.addOverlay(marker);
}
});
// Failure
geocoder.addEventListener(
GeocodingEvent.GEOCODING_FAILURE,
function(event:GeocodingEvent):void {
trace ("Trace --> Geocoding failed!");
trace(event);
trace(event.status);
});
// Takes in the address as a string parameter
geocoder.geocode(testAddress);
}
// --- END OF CODE -- //
I would like to know how to get the properties of a marker (e.g. it's
location, address) when I select it, as well as how to remove that
marker (e.g. how would I refer to that specific marker on the map to
delete it using a button?)
or how I would get reference to that marker when clicking it?
Thanks.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---