PageRenderTime 33ms CodeModel.GetById 11ms app.highlight 16ms RepoModel.GetById 1ms app.codeStats 1ms

/examples/KMLParser/bin-release/srcview/source/com/adobe/xml/syndication/kml/Placemark.as.html

http://gmaps-utility-library-flash.googlecode.com/
HTML | 70 lines | 62 code | 7 blank | 1 comment | 0 complexity | aba909b1d608d666ca0df9a02b5cdb07 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>Placemark.as</title>
 7<link rel="stylesheet" type="text/css" href="../../../../../../SourceStyles.css"/>
 8</head>
 9
10<body><pre><span class="ActionScriptpackage">package</span> <span class="ActionScriptDefault_Text">com</span>.<span class="ActionScriptDefault_Text">adobe</span>.<span class="ActionScriptDefault_Text">xml</span>.<span class="ActionScriptDefault_Text">syndication</span>.<span class="ActionScriptDefault_Text">kml</span>
11<span class="ActionScriptBracket/Brace">{</span>
12    <span class="ActionScriptReserved">import</span> <span class="ActionScriptDefault_Text">com</span>.<span class="ActionScriptDefault_Text">adobe</span>.<span class="ActionScriptDefault_Text">xml</span>.<span class="ActionScriptDefault_Text">syndication</span>.<span class="ActionScriptDefault_Text">Namespaces</span>;
13    <span class="ActionScriptReserved">import</span> <span class="ActionScriptDefault_Text">com</span>.<span class="ActionScriptDefault_Text">adobe</span>.<span class="ActionScriptDefault_Text">xml</span>.<span class="ActionScriptDefault_Text">syndication</span>.<span class="ActionScriptDefault_Text">ParsingTools</span>;
14
15    <span class="ActionScriptASDoc">/**
16    *    Class that represents an Entry element within an Atom feed
17    * 
18    *     @langversion ActionScript 3.0
19    *    @playerversion Flash 8.5
20    *    @tiptext
21    * 
22    *     @see http://www.atomenabled.org/developers/syndication/atom-format-spec.php#rfc.section.4.1.2
23    */</span>
24    <span class="ActionScriptReserved">public</span> <span class="ActionScriptclass">class</span> <span class="ActionScriptDefault_Text">Placemark</span> <span class="ActionScriptReserved">extends</span> <span class="ActionScriptDefault_Text">Feature</span>
25    <span class="ActionScriptBracket/Brace">{</span>
26        <span class="ActionScriptReserved">private</span> <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">kml</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Namespace</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">Namespaces</span>.<span class="ActionScriptDefault_Text">KML_NS</span>;
27        
28        <span class="ActionScriptReserved">private</span> <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">_geometry</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Geometry</span>;
29        
30        <span class="ActionScriptASDoc">/**
31        *    Constructor for class.
32        * 
33        *    @param x An XML document that contains an individual Entry element from 
34        *    an Aton XML feed.
35        *
36        *     @langversion ActionScript 3.0
37        *    @playerversion Flash 8.5
38        *    @tiptext
39        */</span>    
40        <span class="ActionScriptReserved">public</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">Placemark</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">x</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">XMLList</span><span class="ActionScriptBracket/Brace">)</span>
41        <span class="ActionScriptBracket/Brace">{</span>
42            <span class="ActionScriptReserved">super</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">x</span><span class="ActionScriptBracket/Brace">)</span>;
43            
44            <span class="ActionScriptComment">// Features are: &lt;Point&gt;, &lt;LineString&gt;, &lt;LinearRing&gt;, &lt;Polygon&gt;, &lt;MultiGeometry&gt;, &lt;Model&gt;
45</span>            <span class="ActionScriptComment">// We&apos;ll only support &lt;Point&gt;, &lt;LineString&gt;, &lt;LinearRing&gt;, &lt;Polygon&gt;
46</span>            <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">ParsingTools</span>.<span class="ActionScriptDefault_Text">nullCheck</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptReserved">this</span>.<span class="ActionScriptDefault_Text">x</span>.<span class="ActionScriptDefault_Text">kml</span><span class="ActionScriptOperator">::</span><span class="ActionScriptDefault_Text">Point</span><span class="ActionScriptBracket/Brace">))</span> <span class="ActionScriptBracket/Brace">{</span>
47                <span class="ActionScriptReserved">this</span>.<span class="ActionScriptDefault_Text">_geometry</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">Point</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptReserved">this</span>.<span class="ActionScriptDefault_Text">x</span>.<span class="ActionScriptDefault_Text">kml</span><span class="ActionScriptOperator">::</span><span class="ActionScriptDefault_Text">Point</span><span class="ActionScriptBracket/Brace">)</span>;
48            <span class="ActionScriptBracket/Brace">}</span>
49            <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">ParsingTools</span>.<span class="ActionScriptDefault_Text">nullCheck</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptReserved">this</span>.<span class="ActionScriptDefault_Text">x</span>.<span class="ActionScriptDefault_Text">kml</span><span class="ActionScriptOperator">::</span><span class="ActionScriptDefault_Text">LineString</span><span class="ActionScriptBracket/Brace">))</span> <span class="ActionScriptBracket/Brace">{</span>
50                <span class="ActionScriptReserved">this</span>.<span class="ActionScriptDefault_Text">_geometry</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">LineString</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptReserved">this</span>.<span class="ActionScriptDefault_Text">x</span>.<span class="ActionScriptDefault_Text">kml</span><span class="ActionScriptOperator">::</span><span class="ActionScriptDefault_Text">LineString</span><span class="ActionScriptBracket/Brace">)</span>;
51            <span class="ActionScriptBracket/Brace">}</span>
52            <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">ParsingTools</span>.<span class="ActionScriptDefault_Text">nullCheck</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptReserved">this</span>.<span class="ActionScriptDefault_Text">x</span>.<span class="ActionScriptDefault_Text">kml</span><span class="ActionScriptOperator">::</span><span class="ActionScriptDefault_Text">LinearRing</span><span class="ActionScriptBracket/Brace">))</span> <span class="ActionScriptBracket/Brace">{</span>
53                <span class="ActionScriptReserved">this</span>.<span class="ActionScriptDefault_Text">_geometry</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">LinearRing</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptReserved">this</span>.<span class="ActionScriptDefault_Text">x</span>.<span class="ActionScriptDefault_Text">kml</span><span class="ActionScriptOperator">::</span><span class="ActionScriptDefault_Text">LinearRing</span><span class="ActionScriptBracket/Brace">)</span>;
54            <span class="ActionScriptBracket/Brace">}</span>
55            <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">ParsingTools</span>.<span class="ActionScriptDefault_Text">nullCheck</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptReserved">this</span>.<span class="ActionScriptDefault_Text">x</span>.<span class="ActionScriptDefault_Text">kml</span><span class="ActionScriptOperator">::</span><span class="ActionScriptDefault_Text">Polygon</span><span class="ActionScriptBracket/Brace">))</span> <span class="ActionScriptBracket/Brace">{</span>
56                <span class="ActionScriptReserved">this</span>.<span class="ActionScriptDefault_Text">_geometry</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">Polygon</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptReserved">this</span>.<span class="ActionScriptDefault_Text">x</span>.<span class="ActionScriptDefault_Text">kml</span><span class="ActionScriptOperator">::</span><span class="ActionScriptDefault_Text">Polygon</span><span class="ActionScriptBracket/Brace">)</span>;
57            <span class="ActionScriptBracket/Brace">}</span>
58        <span class="ActionScriptBracket/Brace">}</span>
59        
60        <span class="ActionScriptReserved">public</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptReserved">get</span> <span class="ActionScriptDefault_Text">geometry</span><span class="ActionScriptBracket/Brace">()</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Geometry</span> <span class="ActionScriptBracket/Brace">{</span>
61            <span class="ActionScriptReserved">return</span> <span class="ActionScriptReserved">this</span>.<span class="ActionScriptDefault_Text">_geometry</span>;
62        <span class="ActionScriptBracket/Brace">}</span>
63        
64        <span class="ActionScriptReserved">public</span> <span class="ActionScriptReserved">override</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">toString</span><span class="ActionScriptBracket/Brace">()</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">String</span> <span class="ActionScriptBracket/Brace">{</span>
65            <span class="ActionScriptReserved">return</span> <span class="ActionScriptString">&quot;Placemark: &quot;</span> <span class="ActionScriptOperator">+</span> <span class="ActionScriptString">&quot; geometry: &quot;</span> <span class="ActionScriptOperator">+</span> <span class="ActionScriptReserved">this</span>.<span class="ActionScriptDefault_Text">_geometry</span>;
66        <span class="ActionScriptBracket/Brace">}</span>
67    <span class="ActionScriptBracket/Brace">}</span>
68<span class="ActionScriptBracket/Brace">}</span>
69</pre></body>
70</html>