PageRenderTime 60ms CodeModel.GetById 3ms app.highlight 49ms RepoModel.GetById 1ms app.codeStats 0ms

/examples/StyledKMLParser/bin-release/srcview/source/KMLParser.mxml.html

http://gmaps-utility-library-flash.googlecode.com/
HTML | 243 lines | 222 code | 20 blank | 1 comment | 0 complexity | 9f07c389467037b6529f535f1f1b9fb8 MD5 | raw file

Large files files are truncated, but you can click here to view the full 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>KMLParser.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=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;</span>
 11<span class="MXMLComment">&lt;!--</span><span class="MXMLComment">
 12 Copyright 2008 Google Inc. 
 13 Licensed under the Apache License, Version 2.0:
 14    http://www.apache.org/licenses/LICENSE-2.0
 15</span><span class="MXMLComment">--&gt;</span>
 16<span class="MXMLComponent_Tag">&lt;mx:Application</span><span class="MXMLDefault_Text"> xmlns:mx=&quot;</span><span class="MXMLString">http://www.adobe.com/2006/mxml</span><span class="MXMLDefault_Text">&quot; xmlns:maps=&quot;</span><span class="MXMLString">com.google.maps.*</span><span class="MXMLDefault_Text">&quot; layout=&quot;</span><span class="MXMLString">absolute</span><span class="MXMLDefault_Text">&quot; width=&quot;</span><span class="MXMLString">100%</span><span class="MXMLDefault_Text">&quot; height=&quot;</span><span class="MXMLString">100%</span><span class="MXMLDefault_Text">&quot; viewSourceURL=&quot;</span><span class="MXMLString">srcview/index.html</span><span class="MXMLDefault_Text">&quot;</span><span class="MXMLComponent_Tag">&gt;</span>
 17  <span class="MXMLComponent_Tag">&lt;mx:Panel</span><span class="MXMLDefault_Text"> title=&quot;</span><span class="MXMLString">Google Maps API for Flash Demo</span><span class="MXMLDefault_Text">&quot; width=&quot;</span><span class="MXMLString">100%</span><span class="MXMLDefault_Text">&quot; height=&quot;</span><span class="MXMLString">100%</span><span class="MXMLDefault_Text">&quot;</span><span class="MXMLComponent_Tag">&gt;</span>
 18   <span class="MXMLComponent_Tag">&lt;mx:VBox</span><span class="MXMLDefault_Text"> width=&quot;</span><span class="MXMLString">100%</span><span class="MXMLDefault_Text">&quot; height=&quot;</span><span class="MXMLString">100%</span><span class="MXMLDefault_Text">&quot;</span><span class="MXMLComponent_Tag">&gt;</span>
 19   <span class="MXMLComponent_Tag">&lt;mx:ComboBox</span><span class="MXMLDefault_Text">
 20       id=&quot;</span><span class="MXMLString">kmlFiles</span><span class="MXMLDefault_Text">&quot;
 21    dataProvider = </span>&quot;<span class="MXMLString">{</span><span class="ActionScriptDefault_Text">SAMPLE_FILES</span><span class="MXMLString">}</span><span class="MXMLDefault_Text">&quot;
 22    change=&quot;</span><span class="ActionScriptDefault_Text">loadFile</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">event</span><span class="ActionScriptBracket/Brace">)</span><span class="MXMLDefault_Text">&quot;</span><span class="MXMLComponent_Tag">/&gt;</span>
 23   <span class="MXMLComponent_Tag">&lt;mx:HDividedBox</span><span class="MXMLDefault_Text"> width=&quot;</span><span class="MXMLString">100%</span><span class="MXMLDefault_Text">&quot; height=&quot;</span><span class="MXMLString">100%</span><span class="MXMLDefault_Text">&quot;</span><span class="MXMLComponent_Tag">&gt;</span>
 24   <span class="MXMLComponent_Tag">&lt;mx:Tree</span><span class="MXMLDefault_Text"> id=&quot;</span><span class="MXMLString">kmlTree</span><span class="MXMLDefault_Text">&quot; width=&quot;</span><span class="MXMLString">200</span><span class="MXMLDefault_Text">&quot; height=&quot;</span><span class="MXMLString">100%</span><span class="MXMLDefault_Text">&quot; dataProvider=&quot;</span><span class="MXMLString">{</span><span class="ActionScriptDefault_Text">kmlObj</span><span class="MXMLString">}</span><span class="MXMLDefault_Text">&quot; change=&quot;</span><span class="ActionScriptDefault_Text">changeEvt</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">event</span><span class="ActionScriptBracket/Brace">)</span>;<span class="MXMLDefault_Text">&quot; labelField=&quot;</span><span class="MXMLString">name</span><span class="MXMLDefault_Text">&quot; showRoot=&quot;</span><span class="MXMLString">false</span><span class="MXMLDefault_Text">&quot;</span><span class="MXMLComponent_Tag">/&gt;</span>
 25   <span class="MXMLComponent_Tag">&lt;maps:Map</span><span class="MXMLDefault_Text"> 
 26    id=&quot;</span><span class="MXMLString">map</span><span class="MXMLDefault_Text">&quot; 
 27    key=&quot;</span><span class="MXMLString">ABQIAAAA7QUChpcnvnmXxsjC7s1fCxQGj0PqsCtxKvarsoS-iqLdqZSKfxTd7Xf-2rEc_PC9o8IsJde80Wnj4g</span><span class="MXMLDefault_Text">&quot; 
 28    mapevent_mapready=&quot;</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">&quot;
 29    width=&quot;</span><span class="MXMLString">100%</span><span class="MXMLDefault_Text">&quot; height=&quot;</span><span class="MXMLString">100%</span><span class="MXMLDefault_Text">&quot;</span><span class="MXMLComponent_Tag">/&gt;</span>
 30    <span class="MXMLComponent_Tag">&lt;/mx:HDividedBox&gt;</span>
 31    <span class="MXMLComponent_Tag">&lt;/mx:VBox&gt;</span>
 32  <span class="MXMLComponent_Tag">&lt;/mx:Panel&gt;</span>
 33  <span class="MXMLSpecial_Tag">&lt;mx:Script&gt;</span>
 34    <span class="ActionScriptOperator">&lt;!</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">CDATA</span><span class="ActionScriptBracket/Brace">[</span>
 35  <span class="ActionScriptReserved">import</span> <span class="ActionScriptDefault_Text">flash</span>.<span class="ActionScriptDefault_Text">events</span>.<span class="ActionScriptDefault_Text">Event</span>;
 36  
 37  <span class="ActionScriptReserved">import</span> <span class="ActionScriptDefault_Text">com</span>.<span class="ActionScriptDefault_Text">google</span>.<span class="ActionScriptDefault_Text">maps</span>.<span class="ActionScriptDefault_Text">controls</span>.<span class="ActionScriptDefault_Text">ZoomControl</span>;
 38  <span class="ActionScriptReserved">import</span> <span class="ActionScriptDefault_Text">com</span>.<span class="ActionScriptDefault_Text">google</span>.<span class="ActionScriptDefault_Text">maps</span>.<span class="ActionScriptDefault_Text">overlays</span>.<span class="ActionScriptDefault_Text">Polyline</span>;
 39  <span class="ActionScriptReserved">import</span> <span class="ActionScriptDefault_Text">com</span>.<span class="ActionScriptDefault_Text">google</span>.<span class="ActionScriptDefault_Text">maps</span>.<span class="ActionScriptDefault_Text">overlays</span>.<span class="ActionScriptDefault_Text">Polygon</span>;
 40  <span class="ActionScriptReserved">import</span> <span class="ActionScriptDefault_Text">com</span>.<span class="ActionScriptDefault_Text">google</span>.<span class="ActionScriptDefault_Text">maps</span>.<span class="ActionScriptDefault_Text">overlays</span>.<span class="ActionScriptDefault_Text">PolygonOptions</span>;
 41  <span class="ActionScriptReserved">import</span> <span class="ActionScriptDefault_Text">com</span>.<span class="ActionScriptDefault_Text">google</span>.<span class="ActionScriptDefault_Text">maps</span>.<span class="ActionScriptDefault_Text">overlays</span>.<span class="ActionScriptDefault_Text">Marker</span>;
 42  <span class="ActionScriptReserved">import</span> <span class="ActionScriptDefault_Text">com</span>.<span class="ActionScriptDefault_Text">google</span>.<span class="ActionScriptDefault_Text">maps</span>.<span class="ActionScriptDefault_Text">MapEvent</span>;
 43  <span class="ActionScriptReserved">import</span> <span class="ActionScriptDefault_Text">com</span>.<span class="ActionScriptDefault_Text">google</span>.<span class="ActionScriptDefault_Text">maps</span>.<span class="ActionScriptDefault_Text">Map</span>;
 44  <span class="ActionScriptReserved">import</span> <span class="ActionScriptDefault_Text">com</span>.<span class="ActionScriptDefault_Text">google</span>.<span class="ActionScriptDefault_Text">maps</span>.<span class="ActionScriptDefault_Text">MapType</span>;
 45  <span class="ActionScriptReserved">import</span> <span class="ActionScriptDefault_Text">com</span>.<span class="ActionScriptDefault_Text">google</span>.<span class="ActionScriptDefault_Text">maps</span>.<span class="ActionScriptDefault_Text">LatLng</span>;
 46  <span class="ActionScriptReserved">import</span> <span class="ActionScriptDefault_Text">com</span>.<span class="ActionScriptDefault_Text">google</span>.<span class="ActionScriptDefault_Text">maps</span>.<span class="ActionScriptDefault_Text">LatLngBounds</span>;
 47  <span class="ActionScriptReserved">import</span> <span class="ActionScriptDefault_Text">com</span>.<span class="ActionScriptDefault_Text">google</span>.<span class="ActionScriptDefault_Text">maps</span>.<span class="ActionScriptDefault_Text">overlays</span>.<span class="ActionScriptDefault_Text">GroundOverlay</span>;
 48  <span class="ActionScriptReserved">import</span> <span class="ActionScriptDefault_Text">com</span>.<span class="ActionScriptDefault_Text">google</span>.<span class="ActionScriptDefault_Text">maps</span>.<span class="ActionScriptDefault_Text">overlays</span>.<span class="ActionScriptDefault_Text">GroundOverlayOptions</span>; 
 49  <span class="ActionScriptReserved">import</span> <span class="ActionScriptDefault_Text">com</span>.<span class="ActionScriptDefault_Text">google</span>.<span class="ActionScriptDefault_Text">maps</span>.<span class="ActionScriptDefault_Text">styles</span>.<span class="ActionScriptOperator">*</span>;
 50  <span class="ActionScriptReserved">import</span> <span class="ActionScriptDefault_Text">com</span>.<span class="ActionScriptDefault_Text">google</span>.<span class="ActionScriptDefault_Text">maps</span>.<span class="ActionScriptDefault_Text">extras</span>.<span class="ActionScriptDefault_Text">xmlparsers</span>.<span class="ActionScriptDefault_Text">kml</span>.<span class="ActionScriptOperator">*</span>;
 51  <span class="ActionScriptReserved">import</span> <span class="ActionScriptDefault_Text">mx</span>.<span class="ActionScriptDefault_Text">controls</span>.<span class="ActionScriptDefault_Text">Alert</span>;
 52  
 53  <span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptMetadata">Bindable</span><span class="ActionScriptBracket/Brace">]</span> <span class="ActionScriptReserved">private</span> <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">kmlObj</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Object</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">Object</span><span class="ActionScriptBracket/Brace">()</span>;
 54  <span class="ActionScriptReserved">private</span> <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">kmlStyles</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Object</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">Object</span><span class="ActionScriptBracket/Brace">()</span>;
 55  
 56  <span class="ActionScriptReserved">public</span> <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">SAMPLE_FILES</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Array</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptString">&quot;styledpoly.xml&quot;</span>, <span class="ActionScriptString">&quot;debug.xml&quot;</span>, <span class="ActionScriptString">&quot;multigeometry.xml&quot;</span>, <span class="ActionScriptString">&quot;polygon.xml&quot;</span><span class="ActionScriptBracket/Brace">]</span>;
 57  
 58  <span class="ActionScriptReserved">public</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="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">MapEvent</span><span class="ActionScriptBracket/Brace">)</span><span class="ActionScriptOperator">:</span><span class="ActionScriptReserved">void</span> <span class="ActionScriptBracket/Brace">{</span>
 59    <span class="ActionScriptDefault_Text">map</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>37.422289,<span class="ActionScriptOperator">-</span>122.0822035<span class="ActionScriptBracket/Brace">)</span>, 14, <span class="ActionScriptDefault_Text">MapType</span>.<span class="ActionScriptDefault_Text">NORMAL_MAP_TYPE</span><span class="ActionScriptBracket/Brace">)</span>;
 60    <span class="ActionScriptDefault_Text">map</span>.<span class="ActionScriptDefault_Text">addControl</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">ZoomControl</span><span class="ActionScriptBracket/Brace">())</span>;
 61    <span class="ActionScriptDefault_Text">loadFile</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptReserved">null</span><span class="ActionScriptBracket/Brace">)</span>;
 62  <span class="ActionScriptBracket/Brace">}</span>
 63  
 64  <span class="ActionScriptReserved">public</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">loadFile</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">event</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Event</span><span class="ActionScriptBracket/Brace">)</span><span class="ActionScriptOperator">:</span><span class="ActionScriptReserved">void</span> <span class="ActionScriptBracket/Brace">{</span>
 65      <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">file</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">String</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">kmlFiles</span>.<span class="ActionScriptDefault_Text">selectedLabel</span>;
 66      <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">loader</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">URLLoader</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">URLLoader</span><span class="ActionScriptBracket/Brace">()</span>;
 67    <span class="ActionScriptDefault_Text">loader</span>.<span class="ActionScriptDefault_Text">addEventListener</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">Event</span>.<span class="ActionScriptDefault_Text">COMPLETE</span>, <span class="ActionScriptDefault_Text">loadXML</span><span class="ActionScriptBracket/Brace">)</span>;
 68    <span class="ActionScriptDefault_Text">loader</span>.<span class="ActionScriptDefault_Text">load</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">URLRequest</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">file</span><span class="ActionScriptBracket/Brace">))</span>;
 69  <span class="ActionScriptBracket/Brace">}</span>
 70  
 71  <span class="ActionScriptReserved">public</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">loadXML</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">event</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Event</span><span class="ActionScriptBracket/Brace">)</span><span class="ActionScriptOperator">:</span><span class="ActionScriptReserved">void</span> <span class="ActionScriptBracket/Brace">{</span>
 72      <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">kml</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Kml22</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">Kml22</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">event</span>.<span class="ActionScriptDefault_Text">target</span>.<span class="ActionScriptDefault_Text">data</span><span class="ActionScriptBracket/Brace">)</span>;
 73    <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">rootFeature</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Feature</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">kml</span>.<span class="ActionScriptDefault_Text">feature</span>;
 74    <span class="ActionScriptDefault_Text">findStyle</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">rootFeature</span><span class="ActionScriptBracket/Brace">)</span>;
 75    
 76    <span class="ActionScriptComment">// @todo: This is redundant with code in getChildrenFeatures, should combine
 77</span>    <span class="ActionScriptDefault_Text">kmlObj</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">Object</span><span class="ActionScriptBracket/Brace">()</span>;
 78    <span class="ActionScriptDefault_Text">kmlObj</span>.<span class="ActionScriptDefault_Text">name</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">rootFeature</span>.<span class="ActionScriptDefault_Text">name</span>;
 79    <span class="ActionScriptDefault_Text">kmlObj</span>.<span class="ActionScriptDefault_Text">mapObjs</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">Array</span><span class="ActionScriptBracket/Brace">()</span>;
 80    <span class="ActionScriptDefault_Text">kmlObj</span>.<span class="ActionScriptDefault_Text">bounds</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">LatLngBounds</span><span class="ActionScriptBracket/Brace">()</span>;
 81    
 82    <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">canContainFeatures</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">rootFeature</span><span class="ActionScriptBracket/Brace">))</span> <span class="ActionScriptBracket/Brace">{</span>
 83      <span class="ActionScriptDefault_Text">kmlObj</span>.<span class="ActionScriptDefault_Text">children</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">getChildrenFeatures</span><span class="ActionScriptBracket/Brace">(C</span><span class="ActionScriptDefault_Text">ontainer</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">rootFeature</span><span class="ActionScriptBracket/Brace">))</span>;
 84    <span class="ActionScriptBracket/Brace">}</span> <span class="ActionScriptReserved">else</span> <span class="ActionScriptBracket/Brace">{</span>
 85      <span class="ActionScriptDefault_Text">associateWithMapObject</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">kmlObj</span>, <span class="ActionScriptDefault_Text">rootFeature</span><span class="ActionScriptBracket/Brace">)</span>;
 86    <span class="ActionScriptBracket/Brace">}</span>
 87    <span class="ActionScriptDefault_Text">map</span>.<span class="ActionScriptDefault_Text">setCenter</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">kmlObj</span>.<span class="ActionScriptDefault_Text">bounds</span>.<span class="ActionScriptDefault_Text">getCenter</span><span class="ActionScriptBracket/Brace">()</span>, <span class="ActionScriptDefault_Text">map</span>.<span class="ActionScriptDefault_Text">getBoundsZoomLevel</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">kmlObj</span>.<span class="ActionScriptDefault_Text">bounds</span><span class="ActionScriptBracket/Brace">))</span>;
 88  <span class="ActionScriptBracket/Brace">}</span>
 89  
 90   <span class="ActionScriptReserved">private</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">changeEvt</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">event</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Event</span><span class="ActionScriptBracket/Brace">)</span><span class="ActionScriptOperator">:</span><span class="ActionScriptReserved">void</span> <span class="ActionScriptBracket/Brace">{</span>
 91       <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">currentObj</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Object</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">event</span>.<span class="ActionScriptDefault_Text">currentTarget</span>.<span class="ActionScriptDefault_Text">selectedItem</span>;
 92       <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">currentObj</span>.<span class="ActionScriptDefault_Text">bounds</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span> <span class="ActionScriptComment">// Otherwise it&apos;s a folder
 93</span>         <span class="ActionScriptDefault_Text">map</span>.<span class="ActionScriptDefault_Text">setCenter</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">currentObj</span>.<span class="ActionScriptDefault_Text">bounds</span>.<span class="ActionScriptDefault_Text">getCenter</span><span class="ActionScriptBracket/Brace">()</span>, <span class="ActionScriptDefault_Text">map</span>.<span class="ActionScriptDefault_Text">getBoundsZoomLevel</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">currentObj</span>.<span class="ActionScriptDefault_Text">bounds</span><span class="ActionScriptBracket/Brace">))</span>;
 94       <span class="ActionScriptBracket/Brace">}</span>
 95   <span class="ActionScriptBracket/Brace">}</span>
 96   
 97   
 98  <span class="ActionScriptReserved">public</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">associateWithMapObject</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">obj</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Object</span>, <span class="ActionScriptDefault_Text">feature</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Feature</span><span class="ActionScriptBracket/Brace">)</span><span class="ActionScriptOperator">:</span><span class="ActionScriptReserved">void</span> <span class="ActionScriptBracket/Brace">{</span>
 99      <span class="ActionScriptComment">// at this point it can either be a placemark or a groundoverlay
100</span>      <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">feature</span> <span class="ActionScriptReserved">is</span> <span class="ActionScriptDefault_Text">Placemark</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
101          <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">placemark</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Placemark</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">Placemark</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">feature</span><span class="ActionScriptBracket/Brace">)</span>;
102          <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">placemark</span>.<span class="ActionScriptDefault_Text">geometry</span> <span class="ActionScriptOperator">!=</span> <span class="ActionScriptReserved">null</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
103            <span class="ActionScriptDefault_Text">associateGeometryWithMapObject</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">obj</span>, <span class="ActionScriptDefault_Text">placemark</span>.<span class="ActionScriptDefault_Text">geometry</span>, <span class="ActionScriptDefault_Text">placemark</span>.<span class="ActionScriptDefault_Text">styleUrl</span><span class="ActionScriptBracket/Brace">)</span>;
104          <span class="ActionScriptBracket/Brace">}</span>
105      <span class="ActionScriptBracket/Brace">}</span> <span class="ActionScriptReserved">else</span> <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">feature</span> <span class="ActionScriptReserved">is</span> <span class="ActionScriptDefault_Text">KmlGroundOverlay</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
106          <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">groundOverlay</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">KmlGroundOverlay</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">KmlGroundOverlay</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">feature</span><span class="ActionScriptBracket/Brace">)</span>;
107          <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">latLngBounds</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">LatLngBounds</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">LatLngBounds</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">LatLng</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">groundOverlay</span>.<span class="ActionScriptDefault_Text">latLonBox</span>.<span class="ActionScriptDefault_Text">south</span>,<span class="ActionScriptDefault_Text">groundOverlay</span>.<span class="ActionScriptDefault_Text">latLonBox</span>.<span class="ActionScriptDefault_Text">west</span><span class="ActionScriptBracket/Brace">)</span>, <span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">LatLng</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">groundOverlay</span>.<span class="ActionScriptDefault_Text">latLonBox</span>.<span class="ActionScriptDefault_Text">north</span>,<span class="ActionScriptDefault_Text">groundOverlay</span>.<span class="ActionScriptDefault_Text">latLonBox</span>.<span class="ActionScriptDefault_Text">east</span><span class="ActionScriptBracket/Brace">))</span>;
108          <span class="ActionScriptDefault_Text">updateBounds</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">obj</span>, <span class="ActionScriptDefault_Text">latLngBounds</span><span class="ActionScriptBracket/Brace">)</span>;
109          <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">testLoader</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Loader</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">Loader</span><span class="ActionScriptBracket/Brace">()</span>;
110          <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">urlRequest</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">URLRequest</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">URLRequest</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">groundOverlay</span>.<span class="ActionScriptDefault_Text">icon</span>.<span class="ActionScriptDefault_Text">href</span><span class="ActionScriptBracket/Brace">)</span>;
111        <span class="ActionScriptDefault_Text">testLoader</span>.<span class="ActionScriptDefault_Text">contentLoaderInfo</span>.<span class="ActionScriptDefault_Text">addEventListener</span><span class="ActionScriptBracket/Brace">(</span>
112          <span class="ActionScriptDefault_Text">Event</span>.<span class="ActionScriptDefault_Text">COMPLETE</span>,
113          <span class="ActionScriptfunction">function</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">e</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Event</span><span class="ActionScriptBracket/Brace">)</span><span class="ActionScriptOperator">:</span><span class="ActionScriptReserved">void</span> <span class="ActionScriptBracket/Brace">{</span>
114            <span class="ActionScriptDefault_Text">obj</span>.<span class="ActionScriptDefault_Text">mapObject</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">com</span>.<span class="ActionScriptDefault_Text">google</span>.<span class="ActionScriptDefault_Text">maps</span>.<span class="ActionScriptDefault_Text">overlays</span>.<span class="ActionScriptDefault_Text">GroundOverlay</span><span class="ActionScriptOperator">::</span><span class="ActionScriptDefault_Text">GroundOverlay</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">testLoader</span>, <span class="ActionScriptDefault_Text">latLngBounds</span><span class="ActionScriptBracket/Brace">)</span>;
115            <span class="ActionScriptDefault_Text">map</span>.<span class="ActionScriptDefault_Text">addOverlay</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">obj</span>.<span class="ActionScriptDefault_Text">mapObject</span><span class="ActionScriptBracket/Brace">)</span>;
116        <span class="ActionScriptBracket/Brace">})</span>;
117        <span class="ActionScriptDefault_Text">testLoader</span>.<span class="ActionScriptDefault_Text">load</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">urlRequest</span><span class="ActionScriptBracket/Brace">)</span>; 
118      <span class="ActionScriptBracket/Brace">}</span> 
119  <span class="ActionScriptBracket/Brace">}</span>
120  
121  <span class="ActionScriptReserved">public</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">associateGeometryWithMapObject</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">obj</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Object</span>, <span class="ActionScriptDefault_Text">geometry</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Geometry</span>, <span class="ActionScriptDefault_Text">styleUrl</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">String</span><span class="ActionScriptBracket/Brace">)</span><span class="ActionScriptOperator">:</span><span class="ActionScriptReserved">void</span> <span class="ActionScriptBracket/Brace">{</span>
122    <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">geometry</span> <span class="ActionScriptReserved">is</span> <span class="ActionScriptDefault_Text">KmlPoint</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
123      <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">point</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">KmlPoint</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">KmlPoint</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">geometry</span><span class="ActionScriptBracket/Brace">)</span>;
124      <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">latlng</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">LatLng</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">LatLng</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">point</span>.<span class="ActionScriptDefault_Text">coordinates</span>.<span class="ActionScriptDefault_Text">coordsList</span><span class="ActionScriptBracket/Brace">[</span>0<span class="ActionScriptBracket/Brace">]</span>.<span class="ActionScriptDefault_Text">lat</span>, <span class="ActionScriptDefault_Text">point</span>.<span class="ActionScriptDefault_Text">coordinates</span>.<span class="ActionScriptDefault_Text">coordsList</span><span class="ActionScriptBracket/Brace">[</span>0<span class="ActionScriptBracket/Brace">]</span>.<span class="ActionScriptDefault_Text">lon</span><span class="ActionScriptBracket/Brace">)</span>;
125      <span class="ActionScriptDefault_Text">obj</span>.<span class="ActionScriptDefault_Text">mapObjs</span>.<span class="ActionScriptDefault_Text">push</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">Marker</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">latlng</span><span class="ActionScriptBracket/Brace">))</span>;
126      <span class="ActionScriptDefault_Text">updateBounds</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">obj</span>, <span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">LatLngBounds</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">latlng</span>, <span class="ActionScriptDefault_Text">latlng</span><span class="ActionScriptBracket/Brace">))</span>;
127      <span class="ActionScriptDefault_Text">map</span>.<span class="ActionScriptDefault_Text">addOverlay</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">obj</span>.<span class="ActionScriptDefault_Text">mapObjs</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">obj</span>.<span class="ActionScriptDefault_Text">mapObjs</span>.<span class="ActionScriptDefault_Text">length</span> <span class="ActionScriptOperator">-</span>1<span class="ActionScriptBracket/Brace">])</span>;
128    <span class="ActionScriptBracket/Brace">}</span> <span class="ActionScriptReserved">else</span> <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">geometry</span> <span class="ActionScriptReserved">is</span> <span class="ActionScriptDefault_Text">LineString</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
129      <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">lineString</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">LineString</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">LineString</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">geometry</span><span class="ActionScriptBracket/Brace">)</span>;
130      <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">polyline</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Polyline</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">Polyline</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">getCoordinatesLatLngs</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">lineString</span>.<span class="ActionScriptDefault_Text">coordinates</span><span class="ActionScriptBracket/Brace">))</span>;
131      <span class="ActionScriptDefault_Text">obj</span>.<span class="ActionScriptDefault_Text">mapObjs</span>.<span class="ActionScriptDefault_Text">push</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">polyline</span><span class="ActionScriptBracket/Brace">)</span>;
132      <span class="ActionScriptDefault_Text">updateBounds</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">obj</span>, <span class="ActionScriptDefault_Text">polyline</span>.<span class="ActionScriptDefault_Text">getLatLngBounds</span><span class="ActionScriptBracket/Brace">())</span>;
133      <span class="ActionScriptDefault_Text">obj</span>.<span class="ActionScriptDefault_Text">center</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">polyline</span>.<span class="ActionScriptDefault_Text">getLatLngBounds</span><span class="ActionScriptBracket/Brace">()</span>.<span class="ActionScriptDefault_Text">getCenter</span><span class="ActionScriptBracket/Brace">()</span>;
134      <span class="ActionScriptDefault_Text">obj</span>.<span class="ActionScriptDefault_Text">bounds</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">polyline</span>.<span class="ActionScriptDefault_Text">getLatLngBounds</span><span class="ActionScriptBracket/Brace">()</span>;
135      <span class="ActionScriptDefault_Text">map</span>.<span class="ActionScriptDefault_Text">addOverlay</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">polyline</span><span class="ActionScriptBracket/Brace">)</span>;
136    <span class="ActionScriptBracket/Brace">}</span> <span class="ActionScriptReserved">else</span> <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">geometry</span> <span class="ActionScriptReserved">is</span> <span class="ActionScriptDefault_Text">LinearRing</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
137      <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">linearRing</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">LinearRing</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">LinearRing</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">geometry</span><span class="ActionScriptBracket/Brace">)</span>;
138      <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">polyline</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Polyline</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">Polyline</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">getCoordinatesLatLngs</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">linearRing</span>.<span class="ActionScriptDefault_Text">coordinates</span><span class="ActionScriptBracket/Brace">))</span>;
139      <span class="ActionScriptDefault_Text">obj</span>.<span class="ActionScriptDefault_Text">mapObjs</span>.<span class="ActionScriptDefault_Text">push</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">polyline</span><span class="ActionScriptBracket/Brace">)</span>;
140      <span class="ActionScriptDefault_Text">updateBounds</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">obj</span>, <span class="ActionScriptDefault_Text">polyline</span>.<span class="ActionScriptDefault_Text">getLatLngBounds</span><span class="ActionScriptBracket/Brace">())</span>;
141      <span class="ActionScriptDefault_Text">map</span>.<span class="ActionScriptDefault_Text">addOverlay</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">polyline</span><span class="ActionScriptBracket/Brace">)</span>;
142    <span class="ActionScriptBracket/Brace">}</span> <span class="ActionScriptReserved">else</span> <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">geometry</span> <span class="ActionScriptReserved">is</span> <span class="ActionScriptDefault_Text">KmlPolygon</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
143      <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">kmlPolygon</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">KmlPolygon</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">KmlPolygon</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">geometry</span><span class="ActionScriptBracket/Brace">)</span>;
144      <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">options</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">PolygonOptions</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">PolygonOptions</span><span class="ActionScriptBracket/Brace">()</span>;
145      <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">styleUrl</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
146          <span class="ActionScriptDefault_Text">styleUrl</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">styleUrl</span>.<span class="ActionScriptDefault_Text">replace</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptString">&quot;#&quot;</span>, <span class="ActionScriptString">&quot;&quot;</span><span class="ActionScriptBracket/Brace">)</span>;
147          <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">kmlStyles</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">styleUrl</span><span class="ActionScriptBracket/Brace">])</span> <span class="ActionScriptBracket/Brace">{</span>
148              <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">style</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Style</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">kmlStyles</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">styleUrl</span><span class="ActionScriptBracket/Brace">]</span>;
149              <span class="ActionScriptDefault_Text">options</span>.<span class="ActionScriptDefault_Text">fillStyle</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">FillStyle</span><span class="ActionScriptBracket/Brace">()</span>;
150              <span class="ActionScriptDefault_Text">options</span>.<span class="ActionScriptDefault_Text">fillStyle</span>.<span class="ActionScriptDefault_Text">color</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">style</span>.<span class="ActionScriptDefault_Text">polyStyle</span>.<span class="ActionScriptDefault_Text">color</span>;
151              <span class="ActionScriptDefault_Text">options</span>.<span class="ActionScriptDefault_Text">strokeStyle</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">StrokeStyle</span><span class="ActionScriptBracket/Brace">()</span>;
152              <span class="ActionScriptDefault_Text">options</span>.<span class="ActionScriptDefault_Text">strokeStyle</span>.<span class="ActionScriptDefault_Text">thickness</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">style</span>.<span class="ActionScriptDefault_Text">lineStyle</span>.<span class="ActionScriptDefault_Text">width</span>;
153       <span class="ActionScriptBracket/Brace">}</span>
154      <span class="ActionScriptBracket/Brace">}</span>
155      <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">polygon</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Polygon</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">Polygon</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">getCoordinatesLatLngs</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">kmlPolygon</span>.<span class="ActionScriptDefault_Text">outerBoundaryIs</span>.<span class="ActionScriptDefault_Text">linearRing</span>.<span class="ActionScriptDefault_Text">coordinates</span><span class="ActionScriptBracket/Brace">)</span>, <span class="ActionScriptDefault_Text">options</span><span class="ActionScriptBracket/Brace">)</span>;
156      <span class="ActionScriptDefault_Text">obj</span>.<span class="ActionScriptDefault_Text">mapObjs</span>.<span class="ActionScriptDefault_Text">push</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">polygon</span><span class="ActionScriptBracket/Brace">)</span>;
157      <span class="ActionScriptDefault_Text">updateBounds</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">obj</span>, <span class="ActionScriptDefault_Text">polygon</span>.<span class="ActionScriptDefault_Text">getLatLngBounds</span><span class="ActionScriptBracket/Brace">())</span>;
158      <span class="ActionScriptDefault_Text">map</span>.<span class="ActionScriptDefault_Text">addOverlay</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">polygon</span><span class="ActionScriptBracket/Brace">)</span>;
159    <span class="ActionScriptBracket/Brace">}</span> <span class="ActionScriptReserved">else</span> <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">geometry</span> <span class="ActionScriptReserved">is</span> <span class="ActionScriptDefault_Text">MultiGeometry</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
160        <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">multiGeometry</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">MultiGeometry</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">MultiGeometry</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">geometry</span><span class="ActionScriptBracket/Brace">)</span>;
161         <span class="ActionScriptReserved">for</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">i</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">uint</span> <span class="ActionScriptOperator">=</span> 0; <span class="ActionScriptDefault_Text">i</span> <span class="ActionScriptOperator">&lt;</span> <span class="ActionScriptDefault_Text">multiGeometry</span>.<span class="ActionScriptDefault_Text">geometries</span>.<span class="ActionScriptDefault_Text">length</span>; <span class="ActionScriptDefault_Text">i</span><span class="ActionScriptOperator">++</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
162           <span class="ActionScriptDefault_Text">associateGeometryWithMapObject</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">obj</span>, <span class="ActionScriptDefault_Text">multiGeometry</span>.<span class="ActionScriptDefault_Text">geometries</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">i</span><span class="ActionScriptBracket/Brace">]</span>, <span class="ActionScriptReserved">null</span><span class="ActionScriptBracket/Brac…

Large files files are truncated, but you can click here to view the full file