如何从ArcGis的MapView屏幕中心获取Point,以表示其纬度和经度?
答案 0 :(得分:0)
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();
答案 1 :(得分:0)
默认情况下,很容易获得中心坐标将线放在下面
LatLng target = mMap.getCameraPosition().target;
通过访问latlng类的经纬度成员获取经纬度
target.latitude;
target.longitude;