Probably answered somewhere, but here goes. To get past the nasty load time
in our large AIR app I am loading our map in a secondary window. Even though
I'm putting the control inits in the mapReady handler they still fail to
work after the app is closed and re-opened:
private function onMapReady(evt:MapEvent):void {
googleMap.setSize(new Point(mapContainer.width, mapContainer.height));
googleMap.addControl(zc);
googleMap.addControl(mtc);
geocoder = new ClientGeocoder();
geocoder.addEventListener(GeocodingEvent.GEOCODING_SUCCESS,
geocoder_geocodingSuccess);
geocoder.addEventListener(GeocodingEvent.GEOCODING_FAILURE,
geocoder_geocodingFailure);
geocoder.geocode(abc.text);
dir = new Directions();
dir.addEventListener(DirectionsEvent.DIRECTIONS_SUCCESS, onDirLoad);
dir.addEventListener(DirectionsEvent.DIRECTIONS_FAILURE, onDirFail);
showMap();
mapContainerVisibility = true;
}
is there a best practice for all this?
--
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.