Zooms in to center of the map with a desired scale factor.
Syntax
Visual Basic (Declaration) | |
---|
Public Overloads Overridable Function Zoom( _
ByVal scaleFactor As Double _
) As ESRI.ArcGIS.ADF.Web.CartoImage |
Visual Basic (Usage) | Copy Code |
---|
Dim instance As View
Dim scaleFactor As Double
Dim value As ESRI.ArcGIS.ADF.Web.CartoImage
value = instance.Zoom(scaleFactor) |
Parameters
- scaleFactor
- Positive value to zoom-in, negative value to zoom-out.
Return Value
New zoomed map image, in the form of a CartoImage object. Use CartoImage.Url to retrieve the image's URL.
Example
This example sets the map envelope, then zooms the map in by a positive scale factor, and prints the resulting extent to a label.
C# | Copy Code |
---|
Envelope env = new Envelope(-60, -60, 60, 60);
mapView.Extent = env;
mapView.Zoom(2);
env = mapView.Extent;
// Map extent is now (-30, -30, 30, 30);
lblCartoImage.Text = "<br>Extent after zoom: " + env.XMin.ToString() + "," + env.XMax.ToString()
+ ", " + env.YMin.ToString() + "," + env.YMax.ToString(); |
Visual Basic | Copy Code |
---|
Dim env As New Envelope(-60, -60, 60, 60)
mapView.Extent = env
mapView.Zoom(2)
env = mapView.Extent
' Map extent Is now (-30, -30, 30, 30);
lblCartoImage.Text = "<br>Extent after zoom: " + env.XMin.ToString() + "," + env.XMax.ToString() _
+ ", " + env.YMin.ToString() + "," + env.YMax.ToString() |
Remarks
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