Android Arcgis 100.3:如何获取地图视图的中心点
如何从屏幕的ArcGis地图视图中心(代表其纬度和经度)获取点?默认情况下,很容易获取中心坐标,将线放在下面Android Arcgis 100.3:如何获取地图视图的中心点,android,android-mapview,arcgis,Android,Android Mapview,Arcgis,如何从屏幕的ArcGis地图视图中心(代表其纬度和经度)获取点?默认情况下,很容易获取中心坐标,将线放在下面 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
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类的纬度和经度成员获取纬度和经度
target.latitude;
target.longitude;
很抱歉,LatLng是Google地图库的一部分,我目前没有使用它(我使用的是ArcGis 100.3),所以。。。