ESRI.ArcGIS.ADF.Web.UI.WebControls
Zoom(Rectangle,Boolean) Method
See Also 
ESRI.ArcGIS.ADF.Web.UI.WebControls Namespace > Map Class > Zoom Method : Zoom(Rectangle,Boolean) Method




screenExtent
A System.Drawing.Rectangle object, with coordinates in screen pixels.
zoomIn
If true, zooms the map in to the extent of the screenExtent rectangle. If false, zooms the map outward so that the current extent fits the screenExtent rectangle.
Zooms the map to a given screen rectangle.

Syntax

Visual Basic (Declaration) 
Public Overloads Sub Zoom( _
   ByVal screenExtent As Rectangle, _
   ByVal zoomIn As Boolean _
) 
Visual Basic (Usage)Copy Code
Dim instance As Map
Dim screenExtent As Rectangle
Dim zoomIn As Boolean
 
instance.Zoom(screenExtent, zoomIn)
C# 
public void Zoom( 
   Rectangle screenExtent,
   bool zoomIn
)

Parameters

screenExtent
A System.Drawing.Rectangle object, with coordinates in screen pixels.
zoomIn
If true, zooms the map in to the extent of the screenExtent rectangle. If false, zooms the map outward so that the current extent fits the screenExtent rectangle.

Remarks

Allows zooming the map into a specific rectangle, or out to fit a rectangle. The rectangle is defined in pixels of the Map control. When the zoomIn parameter is true, this method has the same effect as setting the Extent property of the Map to the rectangle in map coordinates that is equivalent to the screen rectangle passed in. The smaller the screenExtent passed in, the more the map will zoom in, and the larger the new map scale will be.

If the zoomIn parameter is false, the map zooms out. The current map extent will be fit into the screenExtent passed in, and the overall new extent will extend outward to encompass additional area. The smaller the screenExtent passed in, the more the map will zoom outward and the smaller the scale of the new extent.

See Also

© 2010 All Rights Reserved.