Hi, we download an excerpt of a map using OfflineMapTask, OfflineMapJob etc. The specified area (here: Egypt) is defined via an envelope containing the coordinates that we checked both in the ArcGis Map Viewer as well as in Google Maps. Both tools show that the coordinates are correct.
Unfortunately, the result looks like that. The scape of the excerpt is correct, but it is shifted to the top left to approximately half the width and half the hight of the envelope.
Here is how I create the envelopes. I used the Envelope geometry as well as the Polygon geometry. In both cases the map is shifted.
val COUNTRY_BOUNDING_BOX = mapOf(
...
"EGY" to listOf(24.7, 22.0, 36.87, 31.59)
...
)
val envelope = Envelope(
Point(bbox[1], bbox[0], SpatialReference(MapConstants.EPSG_4326)),
Point(bbox[3], bbox[2], SpatialReference(MapConstants.EPSG_4326))
)
val envelope = Envelope(
bbox[1],
bbox[0],
bbox[3],
bbox[2],
spatialReference = SpatialReference(MapConstants.EPSG_4326)
)
Can someone explain this behavior? It does not seem to me like an issue with the SpatialReference.
Solved! Go to Solution.
Okay, shame on me, I changed x and y and the area fits now.
Okay, shame on me, I changed x and y and the area fits now.