PageRenderTime 16ms CodeModel.GetById 10ms app.highlight 1ms RepoModel.GetById 2ms app.codeStats 0ms

/examples/CustomMapMars/src/CustomMapMars.mxml

http://gmaps-utility-library-flash.googlecode.com/
Macromedia eXtensible Markup Language | 35 lines | 33 code | 2 blank | 0 comment | 0 complexity | 708cc73db9f21a19e0b840dc5cc2b496 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    mapevent_mapready="onMapReady(event)"
 7    mapevent_mappreinitialize="onMapPreinitialize(event)"
 8    key="ABQIAAAA7QUChpcnvnmXxsjC7s1fCxQGj0PqsCtxKvarsoS-iqLdqZSKfxTd7Xf-2rEc_PC9o8IsJde80Wnj4g"
 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.Map;
16        import com.google.maps.MapOptions;
17        import com.google.maps.MapType;
18        import com.google.maps.controls.MapTypeControl;
19        import com.google.maps.extras.planetary.Mars;
20        
21        private function onMapPreinitialize(event:Event):void {
22            var opts:MapOptions = new MapOptions();
23            opts.mapTypes = [Mars.ELEVATION_MAP_TYPE, Mars.VISIBLE_MAP_TYPE, Mars.INFRARED_MAP_TYPE]; 
24            opts.mapType = Mars.VISIBLE_MAP_TYPE;
25            opts.center = new LatLng(28, -90);
26            opts.zoom = 6;
27            this.map.setInitOptions(opts);
28        }
29        
30        private function onMapReady(event:Event):void {
31        	this.map.addControl(new MapTypeControl());
32        }
33       ]]>
34   </mx:Script>
35</mx:Application>