Share via


IncludeRefuelWarnings property

Returns or sets whether refuel warnings are included in the driving directions. Read/write Boolean.

Applies to

Objects: DriverProfile

Syntax

object.IncludeRefuelWarnings

Parameters

Part

Description

object

Required. An expression that returns a DriverProfile object.

Remarks

Warnings are added based on FuelTankCapacity, FuelConsumptionCity, FuelConsumptionHighway, TankStartLevel, and TankWarnLevel properties of the DriverProfile object.

Example

  Sub LongRouteWithRefuelWarnings()

  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
  objRoute.Waypoints.Add objMap.FindResults("Seattle, WA").Item(1)
  objRoute.Waypoints.Add objMap.FindResults("Spokane, WA").Item(1)

  'Include refuel warnings in the directions and calculate the route
  objRoute.DriverProfile.IncludeRefuelWarnings = True
  objRoute.Calculate

  End Sub

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