Redraws the map with the specified screen (pixel) envelope coordinates.
Syntax
Visual Basic (Usage) | Copy Code |
---|
Dim instance As View
Dim pixelMinX As Integer
Dim pixelMinY As Integer
Dim pixelMaxX As Integer
Dim pixelMaxY As Integer
Dim value As ESRI.ArcGIS.ADF.Web.CartoImage
value = instance.Draw(pixelMinX, pixelMinY, pixelMaxX, pixelMaxY) |
Parameters
- pixelMinX
- Minimum X value for the screen (pixel) envelope at which the map will be redrawn.
- pixelMinY
- Minimum Y value for the screen (pixel) envelope at which the map will be redrawn.
- pixelMaxX
- Maximum X value for the screen (pixel) envelope at which the map will be redrawn.
- pixelMaxY
- Maximum Y value for the screen (pixel) envelope at which the map will be redrawn.
Return Value
New redrawn map image, in the form of a CartoImage object. Use CartoImage.Url to retrieve the image's URL.
Example
The following example initializes a MapView's pixel height and width to an image control, sets an initial extent, and then Draws the map based on a pixel envelope. The map zooms to the upper left corner of its previous extent.
C# | Copy Code |
---|
mapView.ImageDescriptor.Width = Convert.ToInt32(imgMap.Width.Value);
mapView.ImageDescriptor.Height = Convert.ToInt32(imgMap.Height.Value);
mapView.Extent = new Envelope(10, 30, 30, 50);
CartoImage resultImage = mapView.Draw(0, 0, 50, 50);
imgMap.ImageUrl = resultImage.Url; |
Visual Basic | Copy Code |
---|
mapView.ImageDescriptor.Width = CInt(imgMap.Width.Value)
mapView.ImageDescriptor.Height = CInt(imgMap.Height.Value)
mapView.Extent = New Envelope(10, 30, 30, 50)
CartoImage resultImage = mapView.Draw(0, 0, 50, 50)
imgMap.ImageUrl = resultImage.Url |
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