Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/182.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android Arcgis 100.3:如何获取地图视图的中心点_Android_Android Mapview_Arcgis - Fatal编程技术网

Android Arcgis 100.3:如何获取地图视图的中心点

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

如何从屏幕的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), 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),所以。。。