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

/examples/ArcGISLink/src/Flat.mxml

http://gmaps-utility-library-flash.googlecode.com/
Macromedia eXtensible Markup Language | 49 lines | 41 code | 8 blank | 0 comment | 0 complexity | e58ce650313ff32240984b059c534f40 MD5 | raw file
 1<?xml version="1.0" encoding="utf-8"?>
 2<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
 3                layout="absolute"
 4                width="100%"
 5                height="100%">
 6  <mx:Panel title="Flat Coordinate System: suitable for small areas"
 7            width="100%"
 8            height="100%">
 9    <maps:Map xmlns:maps="com.google.maps.*"
10              id="map"
11              mapevent_mapready="onMapReady(event)"
12              width="100%"
13              height="100%"
14              key="ABQIAAAA7QUChpcnvnmXxsjC7s1fCxQGj0PqsCtxKvarsoS-iqLdqZSKfxTd7Xf-2rEc_PC9o8IsJde80Wnj4g"/>
15
16  </mx:Panel>
17
18  <mx:Script>
19    <![CDATA[
20      import com.google.maps.LatLngBounds;
21      import com.google.maps.controls.NavigationControl;
22      import com.google.maps.controls.MapTypeControl;
23
24      import com.google.maps.LatLng;
25      import com.google.maps.Map;
26      import com.google.maps.MapEvent;
27      import com.google.maps.MapType;
28      import com.google.maps.MapOptions;
29      import com.google.maps.interfaces.*;
30
31      import com.google.maps.extras.arcgislink.*;
32
33
34
35      private function onMapReady(event:Event):void {
36        map.setCenter(new LatLng(35.227, -80.84),11);
37        map.addControl(new com.google.maps.controls.MapTypeControl());
38        map.addControl(new NavigationControl());
39        map.enableContinuousZoom();
40        map.enableScrollWheelZoom();
41        var tiled:String='http://maps.ci.charlotte.nc.us/ArcGIS/rest/services/GET/BaseMap/MapServer';
42        ArcGISUtil.addArcGISMap(map, tiled, function(res:ArcGISMapType):void {
43            map.setMapType(res);
44          });
45
46      }
47    ]]>
48  </mx:Script>
49</mx:Application>