Store
|
Contact Us
|
Careers
Home
Industries
Products
Training
Support
Services
Events
News
About
About Esri
Careers
Esri Video
Partners
Support
Search Support
You are here: >
ArcScripts
>
Search Results
> Script Details
Login
|
Feedback
|
Help
Maximum map extent
contact author
|
download help
|
report inappropriate content
Author
Jian Huang
File Name
maxextent.zip
Language
JavaScript
Last Modified
Aug 8 2010
Status of work
ESRI Attribution and Licensing Agreement
Software
ArcGIS Server (10.0 and prior)
File Size
2 bytes
Downloads
728
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.
Summary
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.
Another frequently asked question is how to stop the map being panned outside the world boundary. Currently JavaScript API doesn’t support wrapping world map, so if it pans outside the world boundary, strange white space will show up on the map.
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.
Contact Us
|
Privacy
|
Legal
|
Site Map