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