Hi All,

I'm trying to add markers and remove them based on the zoom level of
the map.

Basically my code is as follows (within the class MyMap which extends
Map)


//This function adds a marker to the map and stores a reference to it
in the markerArray which a class variable
public function addMyMarker(_lat:String, _lon:String):void {

        var latlng:LatLng = new LatLng(Number(_lat), Number(_lon));

        var tMarker:MyMarker = new MyMarker(latlng);
        addOverlay(tMarker);
        markerArray.push(tMarker);
}

Then i have this function to remove the markers:

//This function removes all markers that are in the array and then
reinitializes the array
public function removeMarkers():void {

        for (var b in markerArray) {
             removeOverlay(markerArray[b]);
        }
        markerArray = new Array();
}


When i call the removeMarkers function, nothing happens.

Any ideas?

Thanks,
Jon

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