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




The current extent of the map.

Syntax

Visual Basic (Declaration) 
<ResCategoryAttribute("Map Behavior")>
<ResDescriptionAttribute("The initial extent of the map.")>
<BindableAttribute(Bindable=False, Direction=BindingDirection.OneWay)>
<DefaultValueAttribute()>
Public Overridable Property Extent As ESRI.ArcGIS.ADF.Web.Geometry.Envelope
Visual Basic (Usage)Copy Code
Dim instance As Map
Dim value As ESRI.ArcGIS.ADF.Web.Geometry.Envelope
 
instance.Extent = value
 
value = instance.Extent
C# 
[ResCategoryAttribute("Map Behavior")]
[ResDescriptionAttribute("The initial extent of the map.")]
[BindableAttribute(Bindable=false, Direction=BindingDirection.OneWay)]
[DefaultValueAttribute()]
public virtual ESRI.ArcGIS.ADF.Web.Geometry.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 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

Reference

Map Class

Map Members

Envelope Class (ESRI.ArcGIS.ADF.Web)

© 2011 All Rights Reserved.