Hello -

I'm trying to port the Hello World code Google provides in their
tutorial to my .as file instead of adding it to a frame, and can't get
it to work properly. Here is my code:

package {

        import flash.display.*;
        import flash.events.Event;
        import flash.geom.Point;
        import com.google.maps.LatLng;
        import com.google.maps.Map;
        import com.google.maps.MapEvent;
        import com.google.maps.MapType;


        public class Final02 extends Map {

                var map:Map = new Map();


                public function Final02() {

                        map.key = "MyKeyHere";
                        map.addEventListener(MapEvent.MAP_READY, onMapReady);
                }


                public function onMapReady(event:Event):void {
                        map.setSize(new Point(stage.stageWidth, 
stage.stageHeight));
                        map.setCenter(new LatLng(40.736072,-73.992062), 14,
MapType.NORMAL_MAP_TYPE);

                }
        }
}



This doesn't error, but I only get the generic map the world. The
setCenter method isn't working, among other bugs I'm sure. Can anyone
point me in the right direction?

Thanks in advance...!

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