1. 程式人生 > >Android arcgis 座標轉經緯度

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 pointSpatialReference 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