Share via


Waypoint property

Returns the starting waypoint (Waypoint object) for the route segment that includes the specified direction. Read-only.

Applies to

Objects:  Direction

Syntax

object.Waypoint

Parameters

Part Description
object Required. An expression that returns a Direction object.

Example

    Sub GetStartingWaypoint()

  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 route stops 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 starting waypoint of the route   ' using the waypoint property for the fourth direction   MsgBox "Starting waypoint name: " _     + objRoute.Directions.Item(4).Waypoint.Name
  End Sub

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