PageRenderTime 23ms CodeModel.GetById 15ms app.highlight 5ms RepoModel.GetById 2ms app.codeStats 0ms

/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 */ 
 9package com.google.maps.extras.arcgislink {
10
11  public class ResultSet {
12    public var displayFieldName:String;
13    public var features:Array=[];
14    public var fieldAliases:*;
15    public var geometryType:String;
16    public var spatialReference:SpatialReference;
17	/* AGS 10 */
18	public var fields:Array=[];
19	
20
21    public function ResultSet(params:*=null, ovOpts:OverlayOptions=null) {
22      if (params) {
23        if (params.features) {
24          var res:*=params.features;
25          for (var i:int=0; i < res.length; i++) {
26            var r:* = res[i];
27            features.push(new Feature(r, ovOpts,ArcGISUtil.getAttributeValue(r.attributes, params.displayFieldName)));
28          }
29        }
30		if (params.spatialReference && params.spatialReference.wkid){
31			spatialReference = SpatialReferences.getSpatialReference(params.spatialReference.wkid)
32				||new SpatialReference(params.spatialReference);
33		}
34      
35        ArcGISUtil.augmentObject(params, this, false);
36      }
37    }
38
39  }
40}