How to get coordinates on singletap mapview ?
Solved! Go to Solution.
mMapView.setOnSingleTapListener(new OnSingleTapListener() { @Override public void onSingleTap(float v, float v1) { Point p = mMapView.toMapPoint(v,v1); Point newPoint = (Point) GeometryEngine.project(p, mMapView.getSpatialReference(), SpatialReference.create(4326)); Log.e("NewPointCoords", "" + newPoint.getX() + " " + newPoint.getY()); } });
This would give you the coordinates in spatial reference 4326
mMapView.setOnSingleTapListener(new OnSingleTapListener() { @Override public void onSingleTap(float v, float v1) { Point p = mMapView.toMapPoint(v,v1); Point newPoint = (Point) GeometryEngine.project(p, mMapView.getSpatialReference(), SpatialReference.create(4326)); Log.e("NewPointCoords", "" + newPoint.getX() + " " + newPoint.getY()); } });
This would give you the coordinates in spatial reference 4326
Hello,
Can you provide an alternate method for the setOnSingleTapListener in ArcGis 100 in Android?
Hi Mohamed EzzerI,
Did the previous example help resolve your issue? If so, would you please mark it as correct?
Thanks.