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

http://gmaps-utility-library-flash.googlecode.com/ · ActionScript · 47 lines · 22 code · 6 blank · 19 comment · 0 complexity · eff8f162bf8a53ee2282b49a5789cb53 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. */
  6. package 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. * Class that represents a <LatLonBox> element.
  13. *
  14. * @see http://code.google.com/apis/kml/documentation/kmlreference.html#latlonbox
  15. */
  16. public class LatLonBox extends AbstractLatLonBox
  17. {
  18. //todo: add constants for the enum values?
  19. private var _rotation:Number;
  20. /**
  21. * Constructor for class.
  22. *
  23. * @param x
  24. */
  25. public function LatLonBox(x:XMLList)
  26. {
  27. super(x);
  28. this._rotation = ParsingTools.nanCheck(this.x.kml::rotation);
  29. }
  30. /**
  31. * Represents the <rotation> child element.
  32. */
  33. public function get rotation():Number
  34. {
  35. return this._rotation;
  36. }
  37. public override function toString():String {
  38. return "LatLonBox: " + super.toString() + " rotation: " + this._rotation;
  39. }
  40. }
  41. }