Share via


Pan method

Shifts the map view in a given direction by a given amount; similar to using the Pan tool on the Navigation toolbar.

Applies to

Objects:  Map

Syntax

object.Pan(PanDirection, [PanFactor])

Parameters

Part Description
object Required. An expression that returns a Map object.
PanDirection Required GeoPanCmd. The direction to pan.
GeoPanCmd Value Direction
geoNorth
8
North (up)
geoNorthEast
9
Northeast (up and to the right)
geoEast
6
East (right)
geoSouthEast
3
Southeast (down and to the right)
geoSouth
2
South (down)
geoSouthWest
1
Southwest (down and to the left)
geoWest
4
West (left)
geoNorthWest
7
Northwest (up and to the left)
PanFactor Optional Double. Amount to pan, expressed as a fraction of the screen width or height.

Example

    Sub PanTheMapEast()

  Dim objApp As New MapPoint.Application
  'Set up the application   objApp.Visible = True   objApp.UserControl = True
  'Pan the map east   objApp.ActiveMap.Pan geoEast
  End Sub