Share via


Speed property

Returns or sets the average speed at which the user drives on particular types of roads, in GeoUnits per hour. Range is 5–200. Read/write Long.

Applies to

Objects: DriverProfile

Syntax

object.Speed(RoadType)

Parameters

Part

Description

object

Required. An expression that returns a DriverProfile object.

RoadType

Required GeoRoadType. The type of road for which to set an average speed.

GeoRoadTypeValueDescriptionVersion
geoRoadArterial4Arterial roadsMapPoint North America
Minor roadsMapPoint Europe
geoRoadFerry7Not available for use with the Speeds propertyNot applicable
geoRoadInterstate1Interstate highwaysMapPoint North America
MotorwaysMapPoint Europe
geoRoadLimitedAccess2Limited-access highwaysMapPoint North America
Other limited-access highwaysMapPoint Europe
geoRoadOtherHighway3Other highwaysMapPoint North America
Major roadsMapPoint Europe
geoRoadStreet5StreetsMapPoint North America
Street/OtherMapPoint Europe
geoRoadToll6Not available for use with the Speeds propertyNot applicable

Remarks

Example

  Sub ChangeLimitedAccessSpeed()

  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("Spokane, WA").Item(1)

  'Change limited-access road speed
  objRoute.DriverProfile.Speed(geoRoadLimitedAccess) = 55
  objRoute.Calculate

  End Sub
 

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