> Script Details
Maximum map extent
report inappropriate content
Aug 8 2010
Status of work
ESRI Attribution and Licensing Agreement
ArcGIS Server (10.0 and prior)
ArcScripts is intended for the free exchange of scripts and tools related to ESRI software products. Please alert the moderator if this script is a demo, trial-version, or an advertisement for a retail product.
Often times, a web map is composed of a base map layer and a operational map layer. The operational layer focuses on a specific area most likely. However, the base map could cover the whole world. It leads to a question how to limit the map to a specific extent.
In order to resolve those questions, the solution can be broken into two steps:
1. Setting the scale levels to limit the visible scales. It can be achieved by following the online sample “set visible scales”. But it doesn’t prevent users from panning the map outside the focused area.
2. Defining the extent boundary that map cannot move outside, which is illustrated in this sample.