Share via


FuelConsumptionCity property

Returns or sets either the volume per distance or the distance per volume your vehicle travels in the city for the selected unit of measurement for fuel consumption (FuelConsumptionUnits property of the DriverProfile object). Read/write Double.

Applies to

Objects:  DriverProfile

Syntax

object.FuelConsumptionCity

Parameters

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

Remarks

Set the FuelConsumptionCity property after setting the unit of measurement for fuel consumption in the FuelConsumptionUnits property.

Example

    Sub GetCityFuelConsumption()

  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 fuel consumption for city driving   MsgBox "City fuel consumption: " _     + CStr(objRoute.DriverProfile.FuelConsumptionCity)
  End Sub

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