Managing application mapping state


The map and overview map Web controls manage the MapDescription of the MapServer object in session state for you. When you use methods on the MapControl object, such as ZoomtoDefaultExtent, or change the Extent property of the map control MapFunctionality object to navigate the map, the map control internally uses SaveObject and LoadObject to maintain stateful aspects of the application, such as current extent, within session state.
The PageLayoutControl object does the same for the PageDescription and collection of MapDescriptions associated with the MapServer page layout.
The TOCControl object has methods for turning the visibility of layers displayed in a map control on and off. Using the methods on TOCControl to turn layers on and off will update the session's copy of the MapDescription.
If you want to manipulate MapDescription—for example, to add graphics to the map—you can use the MapDescription of the MapFunctionality, in which case you will be manipulating the copy of the map description that the control is managing in session state for you.


See Also:

Working with maps
MapServer
MapServer extensions
Mapping Web services