Thank you the setSize fixed my problem. I was trying to do as you
suggested and extend MovieClip instead of Map but couldn't get the map
to show. I changed GoogleMap to below but the onMapReady never
fires. Do I need to do something different to actually load a Map?
package lib{
import flash.display.MovieClip;
import flash.events.Event;
import flash.geom.Point;
import com.google.maps.Map;
import com.google.maps.MapEvent;
import com.google.maps.MapType;
import com.google.maps.LatLng;
public class GoogleMap extends MovieClip {
var map:Map;
public function GoogleMap(apiKey) {
map = new Map();
map.key = apiKey;
map.addEventListener(MapEvent.MAP_READY, onMapReady);
}
private function onMapReady(event:MapEvent):void {
trace('map loaded');
addChild(map);
map.setSize(new Point(stage.stageWidth, stage.stageHeight));
map.setCenter(new LatLng(40.736072, -73.992062), 14,
MapType.NORMAL_MAP_TYPE);
}
}
}
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---