PROBLEM

The data frame extent is different than expected for a layout result from an ArcMap Server GET_LAYOUT request

Description

You can access the layout of an ArcMap document using the GET_LAYOUT request using a custom client. When you compare the layout image of a GET_LAYOUT request and the layout of the original ArcMap document the spatial extent of the data frames do not match.

Cause

This may be caused by the following:

1. The spatial extent of a layout data frame is dependent on the state of the ArcMap document when it was last saved before it was used to create a service.

If the ArcMap document was saved in data view and the aspect ratio (ratio of X axis and Y axis) of the data view and the aspect ratio of the data frame in the layout are different, then the data frame in the GET_LAYOUT response will be different than the data frame in the map layout.

2. The map scale of the data frame in layout view is different than the map scale of the same data frame in data view.

If the ArcMap document was saved in data view the map scale set for the data frame in layout view will change. This will affect the spatial extent of the data frame in the layout.

3. If the coordinate system specified in FILTERCOORDSYS does not match the coordinate system of the data frame in the original ArcMap document the spatial extent of the data frame in the GET_LAYOUT request may be incorrect.

4. A scale or envelope is not specified in the GET_LAYOUT request. If a GET_IMAGE request was made of the same service before the GET_LAYOUT request it is possible that the data frame scale of the GET_LAYOUT request gets confused with the scale of the GET_IMAGE request.

Solution or Workaround

If you wish to serve layouts, it is recommended that you save the ArcMap document in layout view before creating an ArcMap Service. Solutions 1 and 2 illustrate this.

1. An ArcMap document is created where the apsect ratio of the data frame in the layout is much different than the ratio of the data frame in data view.
Here is the layout view.

This is the orginal ArcMap layout of the Pacific region of the United States.

[O-Image] ArcMap Layout

This is the data view for the same document.
This is the data view for an ArcMap document.  Notice that much more of the United States can be seen than in the layout.  This is because the aspect ratio is very different.  The X axis of the data view is much larger.

[O-Image] ArcMap Data View

The ArcMap Document is saved when the data view is active and then served. This is the response for a GET_LAYOUT request.

This is the response from a GET_LAYOUT request when the map was saved in data view.  Notice that the layout is quite different than the original layout.

[O-Image] Get_Layout Data View

The ArcMap Document is saved when the layout view is active and then served. This is the response for a GET_LAYOUT request.

This is the response from a GET_LAYOUT request when the map was saved in layout view.  It matches the orginal layout in ArcMap.

[O-Image] Get_Layout Layout View

2. An ArcMap document is created where the data frame's map scale for the layout (set for a page size of 22 x 34 inches) is much different than the map scale in the data view.
Here is the layout view.

Notice that the map scale is 1:2,000,000 and Madagascar takes up most of the layout.

[O-Image] ScaleExampleLayoutView

This is the data view for the same document.
Notice that the map scale is 1:10,648,541.  The map scale for the layout of this map document is 1:2,000,000 (page size is 22 x 34 inches)

[O-Image] Scale ExampleDataView

The ArcMap Document is saved when the data view is active and then served. This is the response for a GET_LAYOUT request.

This is the result of a GET_LAYOUT request when the data view is active when saving the document.  Notice Madagascar is much smaller than in the original ArcMap layout.

[O-Image] ScaleExampleLayoutSaved

The ArcMap Document is saved when the layout view is active and then served. This is the response for a GET_LAYOUT request.

This is the result of a GET_LAYOUT request when the layout view is active when saving the document. The result is the same as the original ArcMap layout.

[O-Image] ScaleExampleLayoutSaved

3. If there is a mismatch between the FILTERCOORDSYS and the coordinate system of the data frame in the original ArcMap document, specify the coordinate system within DATAFRAME in the GET_LAYOUT request and use a FILTERCOORDSYS value that matches the data frame coordinate system of the original ArcMap document.

4. Specifying a scale or an envelope for each data frame in the layout for all GET_LAYOUT requests should resolve extent discrepancies.

Article ID:000005137

Software:
  • Legacy Products

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Related Information

Discover more on this topic