Parveen
Parveen

Reputation: 103

How to get lat long after arcgis mapview scroll in android?

I am using Arcgis mapview Api in android.There is a pin we have added at the center of the screen. I want to get the coordinate for the location that comes under that pin when i scroll the map.Please help me. Thanks in advance.

Upvotes: 2

Views: 544

Answers (2)

ARWIN
ARWIN

Reputation: 126

Here is the solution you are looking for hope it will work.

https://developers.arcgis.com/android/beta/sample-code/feature-layer-selection.htm

// get the point that was clicked and convert it to a point in map coordinates

Point clickPoint = mMapView.screenToLocation(new android.graphics.Point(Math.round(e.getX()), Math.round(e.getY())));
                int tolerance = 44;
                double mapTolerance = tolerance * mMapView.getUnitsPerPixel();

Upvotes: 1

Sanjay Kakadiya
Sanjay Kakadiya

Reputation: 1636

Set OnStatusChangeListener on your map and update Point to center. You can check below link for more help.

How to add marker or graphics to MapView using ArcGIS android SDK?

Upvotes: 0

Related Questions