/src/com/google/maps/extras/arcgislink/ResultSet.as

http://gmaps-utility-library-flash.googlecode.com/ · ActionScript · 40 lines · 26 code · 5 blank · 9 comment · 5 complexity · a278ba7d3381a1231886854a4e68ad44 MD5 · raw file

  1. /*
  2. * ArcGIS for Google Maps Flash API
  3. *
  4. * License http://www.apache.org/licenses/LICENSE-2.0
  5. */
  6. /**
  7. * @author nianwei at gmail dot com
  8. */
  9. package com.google.maps.extras.arcgislink {
  10. public class ResultSet {
  11. public var displayFieldName:String;
  12. public var features:Array=[];
  13. public var fieldAliases:*;
  14. public var geometryType:String;
  15. public var spatialReference:SpatialReference;
  16. /* AGS 10 */
  17. public var fields:Array=[];
  18. public function ResultSet(params:*=null, ovOpts:OverlayOptions=null) {
  19. if (params) {
  20. if (params.features) {
  21. var res:*=params.features;
  22. for (var i:int=0; i < res.length; i++) {
  23. var r:* = res[i];
  24. features.push(new Feature(r, ovOpts,ArcGISUtil.getAttributeValue(r.attributes, params.displayFieldName)));
  25. }
  26. }
  27. if (params.spatialReference && params.spatialReference.wkid){
  28. spatialReference = SpatialReferences.getSpatialReference(params.spatialReference.wkid)
  29. ||new SpatialReference(params.spatialReference);
  30. }
  31. ArcGISUtil.augmentObject(params, this, false);
  32. }
  33. }
  34. }
  35. }