/examples/CustomMapMoon/src/CustomMapMoon.mxml
Macromedia eXtensible Markup Language | 37 lines | 35 code | 2 blank | 0 comment | 0 complexity | 1ed9f495770c4a76ab6d51b9d1a92d43 MD5 | raw file
- <?xml version="1.0"?>
- <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:maps="com.google.maps.*" layout="absolute" width="100%" height="100%" viewSourceURL="srcview/index.html">
- <mx:Panel title="Google Maps API for Flash Demo" width="100%" height="100%">
- <maps:Map
- id="map"
- key="ABQIAAAA7QUChpcnvnmXxsjC7s1fCxQGj0PqsCtxKvarsoS-iqLdqZSKfxTd7Xf-2rEc_PC9o8IsJde80Wnj4g"
- mapevent_mapready="onMapReady(event)"
- mapevent_mappreinitialize="onMapPreinitialize(event)"
- width="100%" height="100%"/>
- </mx:Panel>
- <mx:Script>
- <![CDATA[
- import com.google.maps.LatLng;
- import com.google.maps.MapEvent;
- import com.google.maps.MapMouseEvent;
- import com.google.maps.Map;
- import com.google.maps.MapOptions;
- import com.google.maps.MapType;
- import com.google.maps.controls.MapTypeControl;
- import com.google.maps.styles.FillStyle;
- import com.google.maps.extras.planetary.Moon;
-
- private function onMapPreinitialize(event:Event):void {
- var opts:MapOptions = new MapOptions();
- opts.mapTypes = [Moon.ELEVATION_MAP_TYPE, Moon.VISIBLE_MAP_TYPE];
- opts.mapType = Moon.VISIBLE_MAP_TYPE;
- opts.center = new LatLng(28, -90);
- opts.zoom = 6;
- this.map.setInitOptions(opts);
- }
-
- private function onMapReady(event:Event):void {
- this.map.addControl(new MapTypeControl());
- }
- ]]>
- </mx:Script>
- </mx:Application>