Select to view content in your preferred language

Exporting an exact bounding box of a map or image

5085
1
08-22-2011 11:47 AM
AndrewGrondalski
New Contributor
I would like to export a precise bounding box of a map.  The REST API provides a bbox parameter, but it seems to always adjust my extent slightly.  For instance in the URL example below I am providing a bbox of:

XMin = -9770000
XMax = -9590000
YMin = 5100000
YMax = 5400000

The image has the correct YMin and YMax, but I get an XMin of -9830000 and XMax of -9530000.

http://server.arcgisonline.com/ArcGIS/rest/services/USA_Topo_Maps/MapServer/export?bbox=-9770000%2C5...

Is there any way to get the exact bounding box that I want?
0 Kudos
1 Reply
TonyContreras
Deactivated User
The default image size being generated is 400 x 400 pixels. This covers a larger area than you requested, however the default is enforced since you do not provide an image size to use. Using the extent you gave, I figured a width to height ratio of 6/10 (or 0.6). Multiply this by the height (in pixels) of the image you want and that will give you the corresponding width to use. For example, try this.
0 Kudos