Android Arcgis 100.3:如何获取MapView的中心点

Android Arcgis 100.3: How to get center Point of MapView

如何从ArcGis的MapView屏幕中心获取Point,代表它的经纬度?

float centreX=mapView.getX() + mapView.getWidth()  / 2;
float centreY=mapView.getY() + mapView.getHeight() / 2;

android.graphics.Point screenPoint = new android.graphics.Point(Math.round(centreX), Math.round(centreY));
Point mapPoint = mv.screenToLocation(screenPoint);
Point wgs84Point = (Point) GeometryEngine.project(mapPoint, SpatialReferences.getWgs84());

double lat = wgs84Point.getY();
double lng = wgs84Point.getX();

默认情况下,很容易得到中心坐标把线放在下面

 LatLng target = mMap.getCameraPosition().target;

通过访问latlng的经纬度成员获取经纬度class

target.latitude;
target.longitude;