PageRenderTime 9ms CodeModel.GetById 1ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 0ms

/src/com/google/maps/extras/xmlparsers/kml/AbstractLatLonBox.as

http://gmaps-utility-library-flash.googlecode.com/
ActionScript | 73 lines | 40 code | 8 blank | 25 comment | 0 complexity | 8b8568ccfa3de867b3127de43128296a MD5 | raw file
 1/*
 2* Copyright 2008 Google Inc. 
 3* Licensed under the Apache License, Version 2.0:
 4*  http://www.apache.org/licenses/LICENSE-2.0
 5*/
 6package com.google.maps.extras.xmlparsers.kml
 7{
 8    import com.google.maps.extras.xmlparsers.Namespaces;
 9	import com.google.maps.extras.xmlparsers.ParsingTools;
10	import com.google.maps.extras.xmlparsers.XmlElement;
11
12	/**
13	*	Base class for LatLonBox and LatLonAltBox (not implemented).
14	*/
15	public class AbstractLatLonBox extends KmlObject
16	{
17
18		private var _north:Number;	
19		private var _south:Number;	
20		private var _east:Number;	
21		private var _west:Number;		
22  
23		/**
24		*	Constructor for class.
25		* 
26		*	@param x
27		*/	
28		public function AbstractLatLonBox(x:XMLList)
29		{
30			super(x);
31			this._north  = ParsingTools.nanCheck(this.x.kml::north);
32			this._south = ParsingTools.nanCheck(this.x.kml::south);
33			this._east = ParsingTools.nanCheck(this.x.kml::east);
34			this._west = ParsingTools.nanCheck(this.x.kml::west);
35		}
36	 	
37		/**
38		*	Represents the <north> child element.
39		*/	
40		public function get north():Number
41		{
42			return this._north;
43	 	}
44	 	
45	 	/**
46		*	Represents the <south> child element.
47		*/	
48		public function get south():Number
49		{
50			return this._south;
51	 	}
52	 	
53	 	/**
54		*	Represents the <east> child element.
55		*/	
56		public function get east():Number
57		{
58			return this._east;
59	 	}
60	 	
61	 	/**
62		*	Represents the <west> child element.
63		*/	
64		public function get west():Number
65		{
66			return this._west;
67	 	}
68
69		public override function toString():String {
70			return "AbstractLatLonBox: " + " north: " + this._north + "south: " + this._south + "east: " + this._east + " west: " + this._west;
71		}
72	}
73}