ESRI.ArcGIS.ADF.IMS
Pan Method
See Also  Example
ESRI.ArcGIS.ADF.IMS.Carto Namespace > View Class : Pan Method




direction
The direction in which you want to pan.
step
The percentage-based distance you want to pan. Each step represents 10 percent of the map's height or width.
Pan the map image in a designated direction and distance.

Syntax

Visual Basic (Declaration) 
Public Overridable Function Pan( _
   ByVal direction As PanDirection, _
   ByVal step As Integer _
) As CartoImage
Visual Basic (Usage)Copy Code
Dim instance As View
Dim direction As PanDirection
Dim step As Integer
Dim value As CartoImage
 
value = instance.Pan(direction, step)
C# 
public virtual CartoImage Pan( 
   PanDirection direction,
   int step
)

Parameters

direction
The direction in which you want to pan.
step
The percentage-based distance you want to pan. Each step represents 10 percent of the map's height or width.

Return Value

New panned map image, in the form of a CartoImage object. Use CartoImage.Url to retrieve the image's URL.

Example

The following example re-centers the map toward the southeast,
C#Copy Code
CartoImage resultImage = mapView.Pan(PanDirection.SouthEast, 8); 

imgMap.ImageUrl = resultImage.Url; 

    
Visual BasicCopy Code
Dim resultImage As CartoImage = mapView.Pan(PanDirection.SouthEast, 8)

imgMap.ImageUrl = resultImage.Url

Remarks

This method re-centers the map in a direction specified. The step determines how far to move, based on the map's current height, width, or combination of the two.

Each integer step represents ten percent of the map's current height or width. For example, if a step of 5 is specified with a direction of West, the new map extent's MinX and MaxX will be moved 50 percent of the map extent to the west. If a non-cardinal direction (i.e., other than north, south, east or west) is specified, all extent values will be moved the full value of the step. For example, if a step of 5 is specified with a direction of SouthWest, the new map extent's MinX and MaxX will be moved 50 percent to the west, and the MinY and MaxY will be 50 percent to the south.

Any Zoom, Pan, CenterAt or Draw method which changes the map extent also changes the map extent for the MapView.

Note that all zoom, pan, and re-center methods cause the server to generate a map, whether it is accessed or not. If the result of this method is not assigned to a CartoImage object, the image can be retrieved with the Image property of the view.

See Also

© 2010 All Rights Reserved.