ESRI.ArcGIS.ADF.IMS
Image Property
See Also  Example
ESRI.ArcGIS.ADF.IMS.Carto Namespace > View Class : Image Property




The output image object for the view. Use its Url property to get the image location.

Syntax

Visual Basic (Declaration) 
Public ReadOnly Property Image As CartoImage
Visual Basic (Usage)Copy Code
Dim instance As View
Dim value As CartoImage
 
value = instance.Image
C# 
public CartoImage Image {get;}

Example

This example draws the map, which returns a CartoImage object. An image control on the page is set to use the URL of the CartoImage.
C#Copy Code
CartoImage resultImage = mapView.Draw(); 

imgMap.ImageUrl = resultImage.Url; 

    
Visual BasicCopy Code
Dim resultImage As CartoImage = mapView.Draw()

imgMap.ImageUrl = resultImage.Url

Remarks

When one of the view's methods are used that generate a map image, such as Draw or Zoom, the reference to the map image is stored in the CartoImage object in this property. Use the CartoImage.Url property to retrieve the URL string for the image location.

Note that the Zoom, Pan, CenterAt and Draw methods all cause the ArcIMS server to generate an output image. If several of these methods are used in a single client map operation, it may be wasting server resources to draw multiple maps. An alternative would be to calculate the extent of the map needed and use Draw(Envelope), or set the MapView's extent prior to drawing. Another option uses Zoom(double, Point) to simultaneously re-center and zoom the map.

Also note that the MimeData and MimeId of CartoImage will be null when drawing with a MapView or LayoutView. Instead, use the Url property of CartoImage to retrieve the URL location of the map or file.

See Also

© 2010 All Rights Reserved.