I'm trying to export maps from an ArcGIS REST Service using WGS84 and have run into difficulty when the bounding box ends up exceeding latitude 180.

I was hoping that the map would wrap, but it doesn't. In some cases the resulting image ends up zoomed very far out and not anywhere I intended it to be.

This is an example of where the map gets clipped where I'd prefer it wrapped.

This is an example of where I've exceeded 180 and then the image is zoomed out and not on the location I intended.

Using the coordinates of a location I buffer it with a rectangle for the bounding box, which means that in some cases the bounding box will overlap -180 or +180. The resulting bounding box then doesn't get my desired result.

What is the correct way to get this to work?

  • In the ArcGis JavaScript API they have a parameter called "wrapAround180" for WGS84, which probably splits the request. Here, however, it seems you have to do the wrapping code your self, and split it into two requests. It also seems like ESRI falls back to full world extent if the request bbox is out of bounds.. weird behaviour. – Oyvind Aug 24 '13 at 20:43

I had this issue before, and resolved it finally. I use ArcGIS API for JavaScript 3.2. 'esri/tasks/PrintTask' class.

The solution is: don't define Parameters.outSpatialReference in printTask.execute function.

I think somehow this is a bug in exportWebMap service. in mapOptions the spatialReference and outSpatialReference are transformed to wkt. and if you define outSpatialReference, it isn't transformed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.