PageRenderTime 37ms CodeModel.GetById 16ms app.highlight 16ms RepoModel.GetById 1ms app.codeStats 1ms

/examples/ArcGISLink/bin-release/srcview/source/StatePlane.mxml.html

http://gmaps-utility-library-flash.googlecode.com/
HTML | 82 lines | 71 code | 10 blank | 1 comment | 0 complexity | f03d15d4f2834ee2665de2ccbc0e8a3d MD5 | raw file
 1<!-- saved from url=(0014)about:internet -->
 2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 3<html xmlns="http://www.w3.org/1999/xhtml">
 4<head>
 5<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
 6<title>StatePlane.mxml</title>
 7<link rel="stylesheet" type="text/css" href="../SourceStyles.css"/>
 8</head>
 9
10<body><pre><span class="MXMLProcessing_Instruction">&lt;?xml version="1.0" encoding="utf-8"?&gt;</span>
11<span class="MXMLComponent_Tag">&lt;mx:Application</span><span class="MXMLDefault_Text"> xmlns:mx="</span><span class="MXMLString">http://www.adobe.com/2006/mxml</span><span class="MXMLDefault_Text">"
12                layout="</span><span class="MXMLString">absolute</span><span class="MXMLDefault_Text">"
13                width="</span><span class="MXMLString">100%</span><span class="MXMLDefault_Text">"
14                height="</span><span class="MXMLString">100%</span><span class="MXMLDefault_Text">"</span><span class="MXMLComponent_Tag">&gt;</span>
15  <span class="MXMLComponent_Tag">&lt;mx:Panel</span><span class="MXMLDefault_Text"> title="</span><span class="MXMLString">State Plane Coordinate System: NC SP83 Feet</span><span class="MXMLDefault_Text">"
16            width="</span><span class="MXMLString">100%</span><span class="MXMLDefault_Text">"
17            height="</span><span class="MXMLString">100%</span><span class="MXMLDefault_Text">"</span><span class="MXMLComponent_Tag">&gt;</span>
18    <span class="MXMLComponent_Tag">&lt;mx:UIComponent</span><span class="MXMLDefault_Text"> id="</span><span class="MXMLString">mapHolder</span><span class="MXMLDefault_Text">"
19                    creationComplete="</span><span class="ActionScriptDefault_Text">onHolderCreated</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">event</span><span class="ActionScriptBracket/Brace">)</span><span class="MXMLDefault_Text">"
20                    resize="</span><span class="ActionScriptDefault_Text">onHolderResized</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">event</span><span class="ActionScriptBracket/Brace">)</span><span class="MXMLDefault_Text">"
21                    width="</span><span class="MXMLString">100%</span><span class="MXMLDefault_Text">"
22                    height="</span><span class="MXMLString">100%</span><span class="MXMLDefault_Text">"</span><span class="MXMLComponent_Tag">/&gt;</span>
23  <span class="MXMLComponent_Tag">&lt;/mx:Panel&gt;</span>
24
25  <span class="MXMLSpecial_Tag">&lt;mx:Script&gt;</span>
26    &lt;![CDATA[
27      <span class="ActionScriptReserved">import</span> <span class="ActionScriptDefault_Text">com</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">google</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">maps</span><span class="ActionScriptOperator">.</span><span class="ActionScriptOperator">*</span>;
28      <span class="ActionScriptReserved">import</span> <span class="ActionScriptDefault_Text">com</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">google</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">maps</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">controls</span><span class="ActionScriptOperator">.</span><span class="ActionScriptOperator">*</span>;
29      <span class="ActionScriptReserved">import</span> <span class="ActionScriptDefault_Text">com</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">google</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">maps</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">interfaces</span><span class="ActionScriptOperator">.</span><span class="ActionScriptOperator">*</span>;
30      <span class="ActionScriptReserved">import</span> <span class="ActionScriptDefault_Text">flash</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">events</span><span class="ActionScriptOperator">.</span><span class="ActionScriptOperator">*</span>;
31      <span class="ActionScriptReserved">import</span> <span class="ActionScriptDefault_Text">com</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">google</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">maps</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">extras</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">arcgislink</span><span class="ActionScriptOperator">.</span><span class="ActionScriptOperator">*</span>;
32
33     
34      <span class="ActionScriptReserved">private</span> <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">map</span>:<span class="ActionScriptDefault_Text">Map</span>;
35      <span class="ActionScriptReserved">private</span> <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">svc</span>:<span class="ActionScriptDefault_Text">MapService</span>;
36      <span class="ActionScriptDefault_Text">SpatialReferences</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">addSpatialReference</span><span class="ActionScriptBracket/Brace">(</span>2264<span class="ActionScriptOperator">,</span> <span class="ActionScriptString">'PROJCS["NAD_1983_StatePlane_North_Carolina_FIPS_3200_Feet",GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Lambert_Conformal_Conic"],PARAMETER["False_Easting",2000000.002616666],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",-79.0],PARAMETER["Standard_Parallel_1",34.33333333333334],PARAMETER["Standard_Parallel_2",36.16666666666666],PARAMETER["Latitude_Of_Origin",33.75],UNIT["Foot_US",0.3048006096012192]]'</span><span class="ActionScriptBracket/Brace">)</span>;
37
38      <span class="ActionScriptReserved">public</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">onHolderCreated</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">event</span>:<span class="ActionScriptDefault_Text">Event</span><span class="ActionScriptBracket/Brace">)</span>:<span class="ActionScriptReserved">void</span> <span class="ActionScriptBracket/Brace">{</span>
39        <span class="ActionScriptDefault_Text">svc</span><span class="ActionScriptOperator">=</span><span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">MapService</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptString">'http://maps.ci.charlotte.nc.us/ArcGIS/rest/services/GET/BaseMap/MapServer'</span><span class="ActionScriptBracket/Brace">)</span>;
40        <span class="ActionScriptDefault_Text">svc</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">addEventListener</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">ServiceEvent</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">LOAD</span><span class="ActionScriptOperator">,</span> <span class="ActionScriptDefault_Text">onServiceLoad</span><span class="ActionScriptBracket/Brace">)</span>;
41      <span class="ActionScriptBracket/Brace">}</span>
42
43      <span class="ActionScriptReserved">public</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">onHolderResized</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">event</span>:<span class="ActionScriptDefault_Text">Event</span><span class="ActionScriptBracket/Brace">)</span>:<span class="ActionScriptReserved">void</span> <span class="ActionScriptBracket/Brace">{</span>
44        <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">map</span> <span class="ActionScriptOperator">!=</span> <span class="ActionScriptReserved">null</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
45          <span class="ActionScriptDefault_Text">map</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">setSize</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">Point</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">mapHolder</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">width</span><span class="ActionScriptOperator">,</span> <span class="ActionScriptDefault_Text">mapHolder</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">height</span><span class="ActionScriptBracket/Brace">)</span><span class="ActionScriptBracket/Brace">)</span>;
46        <span class="ActionScriptBracket/Brace">}</span>
47      <span class="ActionScriptBracket/Brace">}</span>
48
49      <span class="ActionScriptReserved">public</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">onServiceLoad</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">event</span>:<span class="ActionScriptDefault_Text">ServiceEvent</span><span class="ActionScriptBracket/Brace">)</span>:<span class="ActionScriptReserved">void</span> <span class="ActionScriptBracket/Brace">{</span>
50        <span class="ActionScriptComment">// map should be constructed after service load instead from MXML, if you do not want load Google Tiles at all. 
51</span>        <span class="ActionScriptDefault_Text">map</span><span class="ActionScriptOperator">=</span><span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">Map</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptBracket/Brace">)</span>;
52        <span class="ActionScriptDefault_Text">map</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">key</span><span class="ActionScriptOperator">=</span><span class="ActionScriptString">"ABQIAAAA7QUChpcnvnmXxsjC7s1fCxQGj0PqsCtxKvarsoS-iqLdqZSKfxTd7Xf-2rEc_PC9o8IsJde80Wnj4g"</span>;
53        <span class="ActionScriptDefault_Text">map</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">width</span><span class="ActionScriptOperator">=</span><span class="ActionScriptDefault_Text">mapHolder</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">width</span>;
54        <span class="ActionScriptDefault_Text">map</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">height</span><span class="ActionScriptOperator">=</span><span class="ActionScriptDefault_Text">mapHolder</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">height</span>;
55        <span class="ActionScriptDefault_Text">map</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">sensor</span><span class="ActionScriptOperator">=</span><span class="ActionScriptString">"false"</span>;
56        <span class="ActionScriptDefault_Text">mapHolder</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">addChild</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">map</span><span class="ActionScriptBracket/Brace">)</span>;
57        <span class="ActionScriptDefault_Text">map</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">addEventListener</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">MapEvent</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">MAP_PREINITIALIZE</span><span class="ActionScriptOperator">,</span> <span class="ActionScriptDefault_Text">onMapPreinitialize</span><span class="ActionScriptBracket/Brace">)</span>;
58        <span class="ActionScriptDefault_Text">map</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">addEventListener</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">MapEvent</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">MAP_READY</span><span class="ActionScriptOperator">,</span> <span class="ActionScriptDefault_Text">onMapReady</span><span class="ActionScriptBracket/Brace">)</span>;
59      <span class="ActionScriptBracket/Brace">}</span>
60
61      <span class="ActionScriptReserved">private</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">onMapPreinitialize</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">event</span>:<span class="ActionScriptDefault_Text">Event</span><span class="ActionScriptBracket/Brace">)</span>:<span class="ActionScriptReserved">void</span> <span class="ActionScriptBracket/Brace">{</span>
62        <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">agsLayer</span>:<span class="ActionScriptDefault_Text">ArcGISTileLayer</span><span class="ActionScriptOperator">=</span><span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">ArcGISTileLayer</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">svc</span><span class="ActionScriptBracket/Brace">)</span>;
63        <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">agsMapType</span>:<span class="ActionScriptDefault_Text">ArcGISMapType</span><span class="ActionScriptOperator">=</span><span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">ArcGISMapType</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">agsLayer</span><span class="ActionScriptBracket/Brace">]</span><span class="ActionScriptOperator">,</span> <span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">ArcGISMapTypeOptions</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptBracket/Brace">{</span><span class="ActionScriptDefault_Text">name</span>: <span class="ActionScriptDefault_Text">agsLayer</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">getName</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptBracket/Brace">)</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">replace</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptString">/ /g</span><span class="ActionScriptOperator">,</span> <span class="ActionScriptString">'\n'</span><span class="ActionScriptBracket/Brace">)</span><span class="ActionScriptBracket/Brace">}</span><span class="ActionScriptBracket/Brace">)</span><span class="ActionScriptBracket/Brace">)</span>;
64        <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">bnds</span>:<span class="ActionScriptDefault_Text">LatLngBounds</span><span class="ActionScriptOperator">=</span><span class="ActionScriptDefault_Text">agsLayer</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">getInitialBounds</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptBracket/Brace">)</span>;
65        <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">opts</span>:<span class="ActionScriptDefault_Text">MapOptions</span><span class="ActionScriptOperator">=</span><span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">MapOptions</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptBracket/Brace">)</span>;
66        <span class="ActionScriptDefault_Text">opts</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">zoom</span><span class="ActionScriptOperator">=</span>11;
67        <span class="ActionScriptDefault_Text">opts</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">center</span><span class="ActionScriptOperator">=</span><span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">LatLng</span><span class="ActionScriptBracket/Brace">(</span>35.227<span class="ActionScriptOperator">,</span> <span class="ActionScriptOperator">-</span>80.84<span class="ActionScriptBracket/Brace">)</span>; 
68        <span class="ActionScriptDefault_Text">opts</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">mapTypes</span><span class="ActionScriptOperator">=</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">agsMapType</span><span class="ActionScriptBracket/Brace">]</span>;
69        <span class="ActionScriptDefault_Text">map</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">setInitOptions</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">opts</span><span class="ActionScriptBracket/Brace">)</span>;
70      <span class="ActionScriptBracket/Brace">}</span>
71
72      <span class="ActionScriptReserved">private</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">onMapReady</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">event</span>:<span class="ActionScriptDefault_Text">Event</span><span class="ActionScriptBracket/Brace">)</span>:<span class="ActionScriptReserved">void</span> <span class="ActionScriptBracket/Brace">{</span>
73        <span class="ActionScriptDefault_Text">map</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">addControl</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">com</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">google</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">maps</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">controls</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">MapTypeControl</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptBracket/Brace">)</span><span class="ActionScriptBracket/Brace">)</span>;
74        <span class="ActionScriptDefault_Text">map</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">addControl</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">NavigationControl</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptBracket/Brace">)</span><span class="ActionScriptBracket/Brace">)</span>;
75        <span class="ActionScriptDefault_Text">map</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">enableContinuousZoom</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptBracket/Brace">)</span>;
76        <span class="ActionScriptDefault_Text">map</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">enableScrollWheelZoom</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptBracket/Brace">)</span>;
77        
78      <span class="ActionScriptBracket/Brace">}</span>
79    <span class="ActionScriptBracket/Brace">]</span><span class="ActionScriptBracket/Brace">]</span><span class="ActionScriptOperator">&gt;</span>
80  <span class="MXMLSpecial_Tag">&lt;/mx:Script&gt;</span>
81<span class="MXMLComponent_Tag">&lt;/mx:Application&gt;</span></pre></body>
82</html>