PageRenderTime 20ms CodeModel.GetById 17ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

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

http://gmaps-utility-library-flash.googlecode.com/
ActionScript | 38 lines | 24 code | 4 blank | 10 comment | 3 complexity | 0f40ba8d8766ddd82d75cf1811419d37 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
10package com.google.maps.extras.arcgislink
11{
12  import com.google.maps.LatLng;
13  
14  public class GeocodeResult
15  {
16    public var address:String;
17    public var attributes:*;
18    public var location:LatLng;
19    public var score:Number;
20    public function GeocodeResult(params:*=null, sr:SpatialReference=null)
21    {
22      if (params){
23        sr = sr ||SpatialReferences.WGS84;
24        if (!isNaN(params.location.x) && !isNaN( params.location.y)){
25          var ll:Array=sr.reverse([params.location.x, params.location.y]);
26          location = new LatLng(ll[1],ll[0]);
27        } 
28        address = params.address;
29        attributes = params.attributes;
30        score = params.score;
31        // NAN will cause augument fail.
32       // ags.ArcGISUtil.augmentObject(params, this, false);
33      }
34      
35    }
36
37  }
38}