Share via


Action property

Returns the action for the specified direction. Read-only GeoDirectionAction.

GeoDirectionAction Value Description
geoActionOther 0 Other actions
geoActionDepart 1 Depart from a stop or start point
geoActionArrive 2 Arrive at a stop or end point
geoActionTurnLeft 3 Turn left
geoActionTurnRight 4 Turn right
geoActionBearLeft 5 Bear left
geoActionBearRight 6 Bear right
geoActionMerge 7 Merge onto a highway or motorway, or limited-access road
geoActionContinue 8 Continue traveling in the same direction as the previous instruction
geoActionCrossBorder 9 Cross a border
geoActionTurnBack 10 Turn back to travel in the opposite direction as the previous instruction
geoActionRoundabout 11 Take a roundabout
geoActionConstructionDelay 12 A warning indicating that delays can be expected because of construction.
geoActionConstructionStop 13 A warning indicating that stops or road closures can be expected because of road construction.
geoActionNameChange 14 A warning indicating that the name of the road changes.
geoActionLeftLeft 15 Turn or bear left, and then immediately turn or bear left.
geoActionLeftRight 16 Turn or bear left, and then immediately turn or bear right.
geoActionRightLeft 17 Turn or bear right, and then immediately turn or bear left.
geoActionRightRight 18 Turn or bear right, and then immediately turn or bear right.
geoActionTakeRamp 19 Take a ramp.
geoActionTakeRampLeft 20 Take a ramp to the left.
geoActionTakeRampRight 21 Take a ramp to the right.
geoActionKeepStraight 22 Continue straight when faced with multiple options.
geoActionKeepLeft 23 Stay to the left when faced with multiple options.
geoActionKeepRight 24 Stay to the right when faced with multiple options.
geoActionKeepStraightSame 25 Continue straight to stay on the same road.
geoActionKeepLeftSame 26 Keep left to stay on the same road.
geoActionKeepRightSame 27 Keep right to stay on the same road.
geoActionTurnLeftSame 28 Turn left to stay on the same road.
geoActionTurnRightSame 29 Turn right to stay on the same road.

Note  Previous versions of MapPoint included two directions for roundabouts: geoActionEnterRoundabout (value 11) and geoActionExitRoundabout (value 12). In MapPoint 2006, however, value 11 has changed to geoActionRoundabout and value 12 has been reassigned to geoActionConstructionDelay.

Example

    Sub GetDirectionAction()

  Dim objApp As New MapPoint.Application   Dim objMap As MapPoint.Map   Dim objRoute As MapPoint.Route
  'Set up the application   Set objMap = objApp.ActiveMap   Set objRoute = objMap.ActiveRoute   objApp.Visible = True   objApp.UserControl = True
  'Add waypoints and calculate the route   objRoute.Waypoints.Add objMap.FindResults("Seattle, WA").Item(1)   objRoute.Waypoints.Add objMap.FindResults("Redmond, WA").Item(1)
  objRoute.Calculate
  'Get the action for the first direction   MsgBox "The first direction is action type: " + _     CStr(objRoute.Directions.Item(1).Action)
  End Sub

Note  This sample code is specific for use in MapPoint North America; it is for illustration purposes only.