Android arcgis 座標轉經緯度




If you want to convert map point to lat/long you just need to follow this

Point mapPoint = mMapView.toMapPoint(point.getX(), point.getY());
//Here point is your MotionEvent point
SpatialReference spacRef = SpatialReference.create(4326);
//4326 is for Geographic coordinate systems (GCSs) 
Point ltLn = (Point)
GeometryEngine.project(mapPoint,mMapView.getSpatialReference(), spacRef ); 
//mMapView is your current mapview object

ltLn.getY() will give latitude and ltLn.getX() will give longitude


這是esri.SpatialReference函數中的屬性,wkid即well-known ID(定義好的) ,4326代表地理座標系中的GCS_WGS_1984 ,這個可以在arcgis的幫助中查看

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章