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.