ESRI.ArcGIS.ADF.Web.UI.WebControls
Extent Property
See Also 
ESRI.ArcGIS.ADF.Web.UI.WebControls Namespace > Map Class : Extent Property


The current extent of the map.

Syntax

Visual Basic (Declaration)  
Public Overridable Property Extent As Envelope
Visual Basic (Usage) Copy Code
Dim instance As Map
Dim value As Envelope
 
instance.Extent = value
 
value = instance.Extent
C#  
public virtual Envelope Extent {get; set;}

Example

For an example of setting the Map extent using various callback methods, see the developer kit sample "Common_Callback", C# or VB version--see the Default.aspx page.

Remarks

The current extent of the Map may be retrieved or set with this property. There are many other ways of setting the extent as well, such as the Zoom(Rectangle, bool) and CenterAt(System.Drawing.Point) methods.

Be aware that if you set the extent programmatically during a callback, and the Map control does not initiate the callback, then you must pass the Map's CallbackResults back to the page in order for the changed extent to be displayed to the user. For example, if you add a button control to the page and execute it with a callback, and set the Map extent with this callback, then you must pass the Map's CallbackResults via the button back to the page. See Example for directions to a sample.

Requirements

Target Platforms:Windows XP Professional, Windows Server 2003 family

See Also