Speed property

MapPoint North America 2006 SDK

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.
GeoRoadType Value Description Version
geoRoadArterial
4
Arterial roads MapPoint North America
    Minor roads MapPoint Europe
geoRoadFerry
7
Not available for use with the Speeds property Not applicable
geoRoadInterstate
1
Interstate highways MapPoint North America
    Motorways MapPoint Europe
geoRoadLimitedAccess
2
Limited-access highways MapPoint North America
    Other limited-access highways MapPoint Europe
geoRoadOtherHighway
3
Other highways MapPoint North America
    Major roads MapPoint Europe
geoRoadStreet
5
Streets MapPoint North America
    Street/Other MapPoint Europe
geoRoadToll
6
Not available for use with the Speeds property Not applicable

Remarks

To reset speeds to MapPoint default values, use the ResetSpeeds method on the DriverProfile object.

To return or set GeoUnits, use the Units property of an Application or MappointControl object.

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.

Show: