PageRenderTime 37ms CodeModel.GetById 20ms app.highlight 13ms RepoModel.GetById 1ms app.codeStats 0ms

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

http://gmaps-utility-library-flash.googlecode.com/
HTML | 67 lines | 60 code | 6 blank | 1 comment | 0 complexity | 340ee21f7776f377bdbd2e5a066136c6 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>TileAndDynamic.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">"</span><span class="MXMLComponent_Tag">&gt;</span>
13  <span class="MXMLComponent_Tag">&lt;mx:Panel</span><span class="MXMLDefault_Text"> title="</span><span class="MXMLString">Combine Tiled and Dynamic Map Layers</span><span class="MXMLDefault_Text">"
14            width="</span><span class="MXMLString">100%</span><span class="MXMLDefault_Text">"
15            height="</span><span class="MXMLString">100%</span><span class="MXMLDefault_Text">"</span><span class="MXMLComponent_Tag">&gt;</span>
16    <span class="MXMLComponent_Tag">&lt;mx:HBox&gt;</span>
17      <span class="MXMLComponent_Tag">&lt;mx:Button</span><span class="MXMLDefault_Text"> click="</span><span class="ActionScriptDefault_Text">dynaOverlay</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">hide</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptBracket/Brace">)</span><span class="MXMLDefault_Text">"
18                 label="</span><span class="MXMLString">Hide Census</span><span class="MXMLDefault_Text">"</span><span class="MXMLComponent_Tag">/&gt;</span>
19      <span class="MXMLComponent_Tag">&lt;mx:Button</span><span class="MXMLDefault_Text"> click="</span><span class="ActionScriptDefault_Text">dynaOverlay</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">show</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptBracket/Brace">)</span><span class="MXMLDefault_Text">"
20                 label="</span><span class="MXMLString">Show Census</span><span class="MXMLDefault_Text">"</span><span class="MXMLComponent_Tag">/&gt;</span>
21      <span class="MXMLComponent_Tag">&lt;mx:Text</span><span class="MXMLDefault_Text">   id="</span><span class="MXMLString">msg</span><span class="MXMLDefault_Text">" text="</span><span class="MXMLString">The last map type are tiled map, with different projection and tile sizes. On top of all map types there is a dynamic map layer Census</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;maps:Map</span><span class="MXMLDefault_Text"> xmlns:maps="</span><span class="MXMLString">com.google.maps.*</span><span class="MXMLDefault_Text">"
24              id="</span><span class="MXMLString">map</span><span class="MXMLDefault_Text">"
25              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">"
26              width="</span><span class="MXMLString">100%</span><span class="MXMLDefault_Text">"
27              height="</span><span class="MXMLString">100%</span><span class="MXMLDefault_Text">" sensor="</span><span class="MXMLString">false</span><span class="MXMLDefault_Text">"
28              key="</span><span class="MXMLString">ABQIAAAA7QUChpcnvnmXxsjC7s1fCxQGj0PqsCtxKvarsoS-iqLdqZSKfxTd7Xf-2rEc_PC9o8IsJde80Wnj4g</span><span class="MXMLDefault_Text">"</span><span class="MXMLComponent_Tag">/&gt;</span>
29  <span class="MXMLComponent_Tag">&lt;/mx:Panel&gt;</span>
30  <span class="MXMLSpecial_Tag">&lt;mx:Script&gt;</span>
31    &lt;![CDATA[
32      <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="ActionScriptDefault_Text">MapTypeControlOptions</span>;
33      <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">MapOptions</span>;
34      <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="ActionScriptDefault_Text">NavigationControl</span>;
35      <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="ActionScriptDefault_Text">ZoomControl</span>;
36      <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="ActionScriptDefault_Text">MapTypeControl</span>;
37      <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">LatLng</span>;
38      <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">Map</span>;
39      <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">MapEvent</span>;
40      <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">MapType</span>;
41      <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>;
42      <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>;
43
44
45      <span class="ActionScriptReserved">private</span> <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">dynaOverlay</span>:<span class="ActionScriptDefault_Text">ArcGISMapOverlay</span>;
46
47      <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>
48        <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>45.5<span class="ActionScriptOperator">,</span> <span class="ActionScriptOperator">-</span>122.7<span class="ActionScriptBracket/Brace">)</span><span class="ActionScriptOperator">,</span> 15<span class="ActionScriptBracket/Brace">)</span>;
49        <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>;
50        <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>;
51        <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>;
52
53        <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">baseUrl</span>:<span class="ActionScriptDefault_Text">String</span><span class="ActionScriptOperator">=</span><span class="ActionScriptString">'http://sampleserver1.arcgisonline.com/ArcGIS/rest/services'</span>;
54        <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">dynaUrl</span>:<span class="ActionScriptDefault_Text">String</span><span class="ActionScriptOperator">=</span><span class="ActionScriptDefault_Text">baseUrl</span> <span class="ActionScriptOperator">+</span> <span class="ActionScriptString">'/Demographics/ESRI_Census_USA/MapServer'</span>;
55        <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">agoUrl</span>:<span class="ActionScriptDefault_Text">String</span><span class="ActionScriptOperator">=</span><span class="ActionScriptString">'http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer'</span>;
56
57        <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">ago</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">agoUrl</span><span class="ActionScriptBracket/Brace">)</span>;
58        <span class="ActionScriptDefault_Text">ago</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">e</span>:<span class="ActionScriptDefault_Text">Event</span><span class="ActionScriptBracket/Brace">)</span>:<span class="ActionScriptReserved">void</span> <span class="ActionScriptBracket/Brace">{</span>
59            <span class="ActionScriptDefault_Text">map</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">addMapType</span><span class="ActionScriptBracket/Brace">(</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">ago</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="ActionScriptString">'AGO'</span><span class="ActionScriptBracket/Brace">}</span><span class="ActionScriptBracket/Brace">)</span><span class="ActionScriptBracket/Brace">)</span><span class="ActionScriptBracket/Brace">)</span>;
60          <span class="ActionScriptBracket/Brace">}</span><span class="ActionScriptBracket/Brace">)</span>;
61        <span class="ActionScriptDefault_Text">dynaOverlay</span><span class="ActionScriptOperator">=</span><span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">ArcGISMapOverlay</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">dynaUrl</span><span class="ActionScriptBracket/Brace">)</span>;
62        <span class="ActionScriptDefault_Text">map</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">addOverlay</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">dynaOverlay</span><span class="ActionScriptBracket/Brace">)</span>;
63      <span class="ActionScriptBracket/Brace">}</span>
64    <span class="ActionScriptBracket/Brace">]</span><span class="ActionScriptBracket/Brace">]</span><span class="ActionScriptOperator">&gt;</span>
65  <span class="MXMLSpecial_Tag">&lt;/mx:Script&gt;</span>
66<span class="MXMLComponent_Tag">&lt;/mx:Application&gt;</span></pre></body>
67</html>