PageRenderTime 27ms CodeModel.GetById 21ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/examples/CustomMapMoon/src/CustomMapMoon.mxml

http://gmaps-utility-library-flash.googlecode.com/
Macromedia eXtensible Markup Language | 37 lines | 35 code | 2 blank | 0 comment | 0 complexity | 1ed9f495770c4a76ab6d51b9d1a92d43 MD5 | raw file
 1<?xml version="1.0"?>
 2<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">
 3  <mx:Panel title="Google Maps API for Flash Demo" width="100%" height="100%">
 4  <maps:Map 
 5    id="map" 
 6    key="ABQIAAAA7QUChpcnvnmXxsjC7s1fCxQGj0PqsCtxKvarsoS-iqLdqZSKfxTd7Xf-2rEc_PC9o8IsJde80Wnj4g" 
 7    mapevent_mapready="onMapReady(event)"
 8    mapevent_mappreinitialize="onMapPreinitialize(event)"
 9    width="100%" height="100%"/>
10   </mx:Panel>
11   <mx:Script>
12       <![CDATA[
13       	import com.google.maps.LatLng;
14        import com.google.maps.MapEvent;
15        import com.google.maps.MapMouseEvent;
16        import com.google.maps.Map;
17        import com.google.maps.MapOptions;
18        import com.google.maps.MapType;
19        import com.google.maps.controls.MapTypeControl;
20        import com.google.maps.styles.FillStyle;
21        import com.google.maps.extras.planetary.Moon;
22        
23         private function onMapPreinitialize(event:Event):void {
24            var opts:MapOptions = new MapOptions();
25            opts.mapTypes = [Moon.ELEVATION_MAP_TYPE, Moon.VISIBLE_MAP_TYPE];
26            opts.mapType = Moon.VISIBLE_MAP_TYPE;
27            opts.center = new LatLng(28, -90);
28            opts.zoom = 6;
29            this.map.setInitOptions(opts);
30        }
31                
32        private function onMapReady(event:Event):void {
33            this.map.addControl(new MapTypeControl());
34        }
35       ]]>
36   </mx:Script>
37</mx:Application>