Hi,
How to get MapView's center point using method if there is any? or Hints how to get it from MapView in arcgis java sdk?
The current area covered by your mapview is the ViewPoint.
You can read the Viewpoint into an Envelope geometry. From that Envelope you can call getCenter() which is the centre point of your screen
Envelope extent = (Envelope) mapView.getCurrentViewpoint(Viewpoint.Type.BOUNDING_GEOMETRY).getTargetGeometry(); System.out.println("extent " + extent.toString()); System.out.println("centre " + extent.getCenter().toString());
Is this what you are after?
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.