ESRI.ArcGIS.ADF.IMS
Extent Property
See Also  Example
ESRI.ArcGIS.ADF.IMS.Carto Namespace > View 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 View
Dim value As Envelope
 
instance.Extent = value
 
value = instance.Extent
C# 
public virtual Envelope Extent {get; set;}

Example

This example defines a new extent using four bounding coordinates, applies it to the map, and redraws the map.
C#Copy Code
Envelope newExtent = new Envelope(10.0, 30.0, 30.0, 50.0); 

mapView.Extent = newExtent; 

  

imgMap.ImageUrl = mapView.Draw().Url; 

    
Visual BasicCopy Code
Envelope newExtent = New Envelope(10.0, 30.0, 30.0, 50.0);

mapView.Extent = newExtent;



imgMap.ImageUrl = mapView.Draw().Url;

Remarks

You can get or set the extent of the map. This extent is used when the map is drawn. Note that once the extent is set, it is used in subsequent methods such as Zoom and Pan.

If the extent's width and height are proportionally different from the map's physical height and width in pixels, then the extent may be modified to allow for the difference in proportion. The modified extent will include all of the area in the extent as set, but the height or width may be increased to maintain a correct proportion. This behavior may be changed with the StretchToFit property of the ImageDescriptor property. By default, StretchToFit is false, so that images are not stretched and the extent is adjusted. If StretchToFit is set to true, the extent is not modified and the image will be stretched to fit the non-proportional dimensions.

For a LayoutView, this property determines the physical size of the layout when drawn. The units for the extent are from the LayoutView.Units property. It is not recommended to change this extent. Changing the extent does not resize printing of features in the layout. If a smaller extent is set than the default, the layout is simply cut off and only a portion will be drawn. If a larger extent is set, white space will be added.

See Also

© 2010 All Rights Reserved.