PageRenderTime 51ms CodeModel.GetById 15ms app.highlight 29ms RepoModel.GetById 2ms app.codeStats 0ms

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

http://gmaps-utility-library-flash.googlecode.com/
HTML | 121 lines | 109 code | 11 blank | 1 comment | 0 complexity | c752bdeb098f4781c27375ed39d1c7e6 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>Geocode3D.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">Geocode Address with ArcGIS server locator</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:HBox</span><span class="MXMLDefault_Text"> width="</span><span class="MXMLString">100%</span><span class="MXMLDefault_Text">"
 19             height="</span><span class="MXMLString">100%</span><span class="MXMLDefault_Text">"</span><span class="MXMLComponent_Tag">&gt;</span>
 20      <span class="MXMLComponent_Tag">&lt;mx:VBox</span><span class="MXMLDefault_Text"> height="</span><span class="MXMLString">100%</span><span class="MXMLDefault_Text">"
 21               width="</span><span class="MXMLString">80%</span><span class="MXMLDefault_Text">"</span><span class="MXMLComponent_Tag">&gt;</span>
 22        <span class="MXMLComponent_Tag">&lt;mx:HBox&gt;</span>
 23          <span class="MXMLComponent_Tag">&lt;mx:Label</span><span class="MXMLDefault_Text"> text="</span><span class="MXMLString">Address</span><span class="MXMLDefault_Text">"</span><span class="MXMLComponent_Tag">/&gt;</span>
 24          <span class="MXMLComponent_Tag">&lt;mx:TextInput</span><span class="MXMLDefault_Text"> text="</span><span class="MXMLString">380 New York Street</span><span class="MXMLDefault_Text">"
 25                        id="</span><span class="MXMLString">Address</span><span class="MXMLDefault_Text">"
 26                        maxChars="</span><span class="MXMLString">60</span><span class="MXMLDefault_Text">"
 27                        width="</span><span class="MXMLString">200</span><span class="MXMLDefault_Text">"</span><span class="MXMLComponent_Tag">/&gt;</span>
 28        <span class="MXMLComponent_Tag">&lt;/mx:HBox&gt;</span>
 29        <span class="MXMLComponent_Tag">&lt;mx:HBox&gt;</span>
 30          <span class="MXMLComponent_Tag">&lt;mx:Label</span><span class="MXMLDefault_Text"> text="</span><span class="MXMLString">City</span><span class="MXMLDefault_Text">"</span><span class="MXMLComponent_Tag">/&gt;</span>
 31          <span class="MXMLComponent_Tag">&lt;mx:TextInput</span><span class="MXMLDefault_Text"> text="</span><span class="MXMLString">Redlands</span><span class="MXMLDefault_Text">"
 32                        id="</span><span class="MXMLString">City</span><span class="MXMLDefault_Text">"
 33                        maxChars="</span><span class="MXMLString">20</span><span class="MXMLDefault_Text">"
 34                        width="</span><span class="MXMLString">84</span><span class="MXMLDefault_Text">"</span><span class="MXMLComponent_Tag">/&gt;</span>
 35        <span class="MXMLComponent_Tag">&lt;/mx:HBox&gt;</span>
 36        <span class="MXMLComponent_Tag">&lt;mx:HBox&gt;</span>
 37          <span class="MXMLComponent_Tag">&lt;mx:Label</span><span class="MXMLDefault_Text"> text="</span><span class="MXMLString">State</span><span class="MXMLDefault_Text">"</span><span class="MXMLComponent_Tag">/&gt;</span>
 38          <span class="MXMLComponent_Tag">&lt;mx:TextInput</span><span class="MXMLDefault_Text"> text="</span><span class="MXMLString">CA</span><span class="MXMLDefault_Text">"
 39                        id="</span><span class="MXMLString">State</span><span class="MXMLDefault_Text">"
 40                        maxChars="</span><span class="MXMLString">20</span><span class="MXMLDefault_Text">"
 41                        width="</span><span class="MXMLString">84</span><span class="MXMLDefault_Text">"</span><span class="MXMLComponent_Tag">/&gt;</span>
 42        <span class="MXMLComponent_Tag">&lt;/mx:HBox&gt;</span>
 43        <span class="MXMLComponent_Tag">&lt;mx:HBox&gt;</span>
 44          <span class="MXMLComponent_Tag">&lt;mx:Label</span><span class="MXMLDefault_Text"> text="</span><span class="MXMLString">Zip</span><span class="MXMLDefault_Text">"</span><span class="MXMLComponent_Tag">/&gt;</span>
 45          <span class="MXMLComponent_Tag">&lt;mx:TextInput</span><span class="MXMLDefault_Text"> text="</span><span class="MXMLString">92373</span><span class="MXMLDefault_Text">"
 46                        id="</span><span class="MXMLString">Zip</span><span class="MXMLDefault_Text">"
 47                        maxChars="</span><span class="MXMLString">20</span><span class="MXMLDefault_Text">"
 48                        width="</span><span class="MXMLString">84</span><span class="MXMLDefault_Text">"</span><span class="MXMLComponent_Tag">/&gt;</span>
 49        <span class="MXMLComponent_Tag">&lt;/mx:HBox&gt;</span>
 50        <span class="MXMLComponent_Tag">&lt;mx:HBox&gt;</span>
 51          <span class="MXMLComponent_Tag">&lt;mx:Button</span><span class="MXMLDefault_Text"> label="</span><span class="MXMLString">Geocode via callback</span><span class="MXMLDefault_Text">"
 52                     id="</span><span class="MXMLString">gc0</span><span class="MXMLDefault_Text">"
 53                     enabled="</span><span class="MXMLString">false</span><span class="MXMLDefault_Text">"
 54                     click="</span><span class="ActionScriptDefault_Text">geocode</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptReserved">true</span><span class="ActionScriptBracket/Brace">)</span><span class="MXMLDefault_Text">"</span><span class="MXMLComponent_Tag">/&gt;</span>
 55          <span class="MXMLComponent_Tag">&lt;mx:Button</span><span class="MXMLDefault_Text"> label="</span><span class="MXMLString">Geocode via event</span><span class="MXMLDefault_Text">"
 56                     id="</span><span class="MXMLString">gc1</span><span class="MXMLDefault_Text">"
 57                     enabled="</span><span class="MXMLString">false</span><span class="MXMLDefault_Text">"
 58                     click="</span><span class="ActionScriptDefault_Text">geocode</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptReserved">false</span><span class="ActionScriptBracket/Brace">)</span><span class="MXMLDefault_Text">"</span><span class="MXMLComponent_Tag">/&gt;</span>
 59          <span class="MXMLComponent_Tag">&lt;mx:Label</span><span class="MXMLDefault_Text"> text="</span><span class="MXMLString">Running....</span><span class="MXMLDefault_Text">"
 60                    id="</span><span class="MXMLString">busy</span><span class="MXMLDefault_Text">"
 61                    color="</span><span class="MXMLString">#FF1200</span><span class="MXMLDefault_Text">"
 62                    width="</span><span class="MXMLString">131</span><span class="MXMLDefault_Text">"
 63                    visible="</span><span class="MXMLString">false</span><span class="MXMLDefault_Text">"</span><span class="MXMLComponent_Tag">/&gt;</span>
 64        <span class="MXMLComponent_Tag">&lt;/mx:HBox&gt;</span>
 65        <span class="MXMLComponent_Tag">&lt;maps:Map3D</span><span class="MXMLDefault_Text"> xmlns:maps="</span><span class="MXMLString">com.google.maps.*</span><span class="MXMLDefault_Text">"
 66                  id="</span><span class="MXMLString">map</span><span class="MXMLDefault_Text">"
 67                  mapevent_mappreinitialize="</span><span class="ActionScriptDefault_Text">onMapPreinitialize</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">event</span><span class="ActionScriptBracket/Brace">)</span>;<span class="MXMLDefault_Text">"
 68                  mapevent_mapready="</span><span class="ActionScriptDefault_Text">onMapReady</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">event</span><span class="ActionScriptBracket/Brace">)</span><span class="MXMLDefault_Text">"
 69                  width="</span><span class="MXMLString">100%</span><span class="MXMLDefault_Text">"
 70                  height="</span><span class="MXMLString">100%</span><span class="MXMLDefault_Text">"
 71                  sensor="</span><span class="MXMLString">false</span><span class="MXMLDefault_Text">" key="</span><span class="MXMLString">ABQIAAAA7QUChpcnvnmXxsjC7s1fCxQGj0PqsCtxKvarsoS-iqLdqZSKfxTd7Xf-2rEc_PC9o8IsJde80Wnj4g</span><span class="MXMLDefault_Text">"</span><span class="MXMLComponent_Tag">/&gt;</span>
 72
 73
 74      <span class="MXMLComponent_Tag">&lt;/mx:VBox&gt;</span>
 75      <span class="MXMLComponent_Tag">&lt;mx:List</span><span class="MXMLDefault_Text"> height="</span><span class="MXMLString">100%</span><span class="MXMLDefault_Text">"
 76               width="</span><span class="MXMLString">400</span><span class="MXMLDefault_Text">"
 77               id="</span><span class="MXMLString">resultList</span><span class="MXMLDefault_Text">"</span><span class="MXMLComponent_Tag">&gt;</span>
 78
 79      <span class="MXMLComponent_Tag">&lt;/mx:List&gt;</span>
 80    <span class="MXMLComponent_Tag">&lt;/mx:HBox&gt;</span>
 81
 82  <span class="MXMLComponent_Tag">&lt;/mx:Panel&gt;</span>
 83
 84  <span class="MXMLSpecial_Tag">&lt;mx:Script&gt;</span>
 85    &lt;![CDATA[
 86      <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">geom</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">Attitude</span>;
 87      <span class="ActionScriptReserved">import</span> <span class="ActionScriptDefault_Text">mx</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">events</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">ListEvent</span>;
 88      <span class="ActionScriptReserved">import</span> <span class="ActionScriptDefault_Text">mx</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">controls</span><span class="ActionScriptOperator">.</span><span class="ActionScriptOperator">*</span>;
 89      <span class="ActionScriptReserved">import</span> <span class="ActionScriptDefault_Text">mx</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">controls</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">dataGridClasses</span><span class="ActionScriptOperator">.</span><span class="ActionScriptOperator">*</span>;
 90      <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>;
 91      <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">overlays</span><span class="ActionScriptOperator">.</span><span class="ActionScriptOperator">*</span>;
 92      <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>;
 93      <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>;
 94
 95      <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>;
 96
 97
 98      <span class="ActionScriptReserved">private</span> <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">svc</span>:<span class="ActionScriptDefault_Text">GeocodeService</span>;
 99
100      <span class="ActionScriptReserved">private</span> <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">results</span>:<span class="ActionScriptDefault_Text">Array</span><span class="ActionScriptOperator">=</span>[];
101      <span class="ActionScriptReserved">private</span> <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">overlays</span>:<span class="ActionScriptDefault_Text">Array</span><span class="ActionScriptOperator">=</span>[];
102      <span class="ActionScriptReserved">private</span> <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">bnds</span>:<span class="ActionScriptDefault_Text">LatLngBounds</span>;
103      <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">MapEvent</span><span class="ActionScriptBracket/Brace">)</span>:<span class="ActionScriptReserved">void</span> <span class="ActionScriptBracket/Brace">{</span>
104        <span class="ActionScriptDefault_Text">map</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">setInitOptions</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">MapOptions</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptBracket/Brace">{</span><span class="ActionScriptDefault_Text">viewMode</span>: <span class="ActionScriptDefault_Text">View</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">VIEWMODE_PERSPECTIVE</span><span class="ActionScriptOperator">,</span> <span class="ActionScriptDefault_Text">attitude</span>: <span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">Attitude</span><span class="ActionScriptBracket/Brace">(</span>20<span class="ActionScriptOperator">,</span> 30<span class="ActionScriptOperator">,</span> 0<span class="ActionScriptBracket/Brace">)</span><span class="ActionScriptBracket/Brace">}</span><span class="ActionScriptBracket/Brace">)</span><span class="ActionScriptBracket/Brace">)</span>;
105      <span class="ActionScriptBracket/Brace">}</span>
106      <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>
107        <span class="ActionScriptDefault_Text">map</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">setCenter</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">LatLng</span><span class="ActionScriptBracket/Brace">(</span>40<span class="ActionScriptOperator">,</span> <span class="ActionScriptOperator">-</span>100<span class="ActionScriptBracket/Brace">)</span><span class="ActionScriptOperator">,</span> 4<span class="ActionScriptBracket/Brace">)</span>;
108        <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">MapTypeControl</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptBracket/Brace">)</span><span class="ActionScriptBracket/Brace">)</span>;
109        <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>;
110        <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>;
111        <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>;
112        <span class="ActionScriptDefault_Text">svc</span><span class="ActionScriptOperator">=</span><span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">GeocodeService</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptString">'http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Locators/ESRI_Geocode_USA/GeocodeServer'</span><span class="ActionScriptBracket/Brace">)</span>;
113
114        <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="ActionScriptfunction">function</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">evt</span>:<span class="ActionScriptDefault_Text">ServiceEvent</span><span class="ActionScriptBracket/Brace">)</span>:<span class="ActionScriptReserved">void</span> <span class="ActionScriptBracket/Brace">{</span>
115            <span class="ActionScriptDefault_Text">gc0</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">enabled</span><span class="ActionScriptOperator">=</span><span class="ActionScriptReserved">true</span>;
116            <span class="ActionScriptDefault_Text">gc1</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">enabled</span><span class="ActionScriptOperator">=</span><span class="ActionScriptReserved">true</span>;
117          <span class="ActionScriptBracket/Brace">}</span><span class="ActionScriptBracket/Brace">)</span>;
118        <span class="ActionScriptDefault_Text">resultList</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">addEventListener</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">ListEvent</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">ITEM_CLICK</span><span class="ActionScriptOperator">,</span> <span class="ActionScriptfunction">function</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">evt</span>:<span class="ActionScriptDefault_Text">ListEvent</span><span class="ActionScriptBracket/Brace">)</span>:<span class="ActionScriptReserved">void</span> <span class="ActionScriptBracket/Brace">{</span>
119            <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">row</span>:<span class="ActionScriptDefault_Text">int</span><span class="ActionScriptOperator">=</span><span class="ActionScriptDefault_Text">evt</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">rowIndex</span>;
120            <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">overlays</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">row</span><span class="ActionScriptBracket/Brace">]</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
121              <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">ov</span>:<span class="ActionScriptOperator">*</span>=<span class="ActionScriptOperator">o</span>