Select to view content in your preferred language

Map downloaded with OfflineMapTask shows a shifted area

439
1
Jump to solution
11-16-2023 12:03 AM
padmalcom
Occasional Contributor

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.

envelopeerror.png

0 Kudos
1 Solution

Accepted Solutions
padmalcom
Occasional Contributor

Okay, shame on me, I changed x and y and the area fits now.

View solution in original post

0 Kudos
1 Reply
padmalcom
Occasional Contributor

Okay, shame on me, I changed x and y and the area fits now.

0 Kudos