PageRenderTime 212ms CodeModel.GetById 210ms app.highlight 0ms RepoModel.GetById 1ms app.codeStats 0ms

/examples/CustomMapSky/src/CustomMapSky.mxml

http://gmaps-utility-library-flash.googlecode.com/
Macromedia eXtensible Markup Language | 38 lines | 36 code | 2 blank | 0 comment | 0 complexity | c3d03b5d604e4936285be83310c52243 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.ZoomControl;
20        import com.google.maps.styles.FillStyle;
21        import com.google.maps.extras.planetary.Sky;
22        
23         private function onMapPreinitialize(event:Event):void {
24            var opts:MapOptions = new MapOptions();
25            opts.mapTypes = [Sky.VISIBLE_MAP_TYPE];
26            opts.center = new LatLng(69.35708,30.9375);
27            opts.zoom = 7;
28            opts.backgroundFillStyle = new FillStyle();
29            opts.backgroundFillStyle.color = 0x000000;
30            this.map.setInitOptions(opts);
31        }
32           
33        private function onMapReady(event:Event):void {
34        	this.map.addControl(new ZoomControl());
35        }
36       ]]>
37   </mx:Script>
38</mx:Application>