[GIS] Trying to convert GPS LatLng Android coordinates to use in ArcGIS rest – esriMeters

arcgis-rest-apicoordinate systemgpslatitude longitude

I am getting the LAT and LNG position from Android.
Both values are of type double, in Degrees.

For example: NY, USA
Latitude: 40.7142700
Longitude: -74.0059700

Then I have a service ArcGIS REST.
It uses esriMeters.

How do I convert Lat Lng to esriMeters and back?


More information:

Spatial Reference: 32721 (32721)

Best Answer

This is simple technique you should use com.esri.core.geometry.Point class for converting your GPS lat and lng into ArcGIS map point. For Example:

private Point ConvertMyLocationPoint(final double x, final double y) {
        Point wgspoint = new Point(x, y);
        Point mapPoint = (Point) GeometryEngine.project(wgspoint, SpatialReference.create(4326),
                mMapView.getSpatialReference());

        return mapPoint;    
    }

Reference from this link

Related Question