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

http://gmaps-utility-library-flash.googlecode.com/ · ActionScript · 47 lines · 25 code · 4 blank · 18 comment · 1 complexity · 74ec48e2a0e2e0fc08584671a1ea0de5 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 the <Extendeddata> element.
  13. *
  14. * @see http://code.google.com/apis/kml/documentation/kmlreference.html#extendeddata
  15. */
  16. public class ExtendedData extends Container
  17. {
  18. private var _data: Array;
  19. /**
  20. * Constructor for the class.
  21. *
  22. * @param x
  23. */
  24. public function ExtendedData(x:XMLList)
  25. {
  26. super(x);
  27. this._data = new Array();
  28. var i:XML;
  29. for each (i in this.x.kml::Data) {
  30. this._data.push(new com.google.maps.extras.xmlparsers.kml.Data(XMLList(i)));
  31. }
  32. }
  33. public override function toString():String {
  34. return "ExtendedData: " + super.toString();
  35. }
  36. /**
  37. * Represents the <data> child element.
  38. */
  39. public function get data():Array {
  40. return this._data;
  41. }
  42. }
  43. }