AnsweredAssumed Answered

GeometryEngine doesn't project correct point

Question asked by spkiwi on Jul 18, 2017
Latest reply on Jul 19, 2017 by ANohe-esristaff

Hello everyone.

The thing is, when I project the point, the getX() and getY() methods of the resulting point (mMapPoint) sometimes throw a GeometryException, because its X and Y values are NaN.

Here is the piece of code with the issue I am currently facing.

double locy = mLocationToShow.getLatitude();
double locx = mLocationToShow.getLongitude();

Point wgsPoint = new Point(locx, locy);
SpatialReference spatialNew = SpatialReference.create(4326);
SpatialReference spatialMapView = mMapView.getSpatialReference(); // its value is 102100

mMapPoint = (Point) GeometryEngine.project(wgsPoint,

mMapViewEnvelope = new Envelope(mMapPoint, Constants.kMapMiniMapStandardZoom,

Maybe the issue has something to do with normalization (normalizeCentralMeridian), but I can't figure out how to implement it in this case.

Any help is appreciated.