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.
|
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.