![]() ![]() |
ESRI.ArcGIS.ADF.Web.UI.WebControls | |
Zoom(Rectangle,Boolean) Method | |
See Also Send Feedback |
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.
Visual Basic (Declaration) | |
---|---|
Public Overloads Sub Zoom( _ ByVal screenExtent As Rectangle, _ ByVal zoomIn As Boolean _ ) |
Visual Basic (Usage) | ![]() |
---|---|
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.
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.
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