Share via


Toward property

Returns the toward or signpost text for the specified direction. Read-only String.

Applies to

Objects: Direction

Syntax

object.Toward

Properties

Part

Description

Object

Required. An expression that returns a Direction object.

Example

  Sub SixthDirectionHeading()

  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

  'What are you heading towards in the sixth direction?
  MsgBox "Sixth direction: " + objRoute.Directions.Item(6).Instruction _
    + " and go towards " + objRoute.Directions.Item(6).Toward

  End Sub

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