Android arcgis 坐标转经纬度

来源:互联网 发布:mac apache 无法访问 编辑:程序博客网 时间:2024/06/03 22:48





down vote

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


这是esri.SpatialReference函数中的属性,wkid即well-known ID(定义好的) ,4326代表地理坐标系中的GCS_WGS_1984 ,这个可以在arcgis的帮助中查看

0 0
原创粉丝点击