RestStopDuration property
Returns or sets the duration for each rest stop, in fractional days rounded to the nearest even minute. Must be an even number of minutes less than 999. Read/write Double.
Applies to
Objects: DriverProfile
Syntax
object.RestStopDuration
Parameters
Part | Description |
---|---|
object | Required. An expression that returns a DriverProfile object. |
Remarks
You can use the GeoTimeConstants constant geoOneMinute when setting the RestStopDuration property. For example, a 15-minute rest stop can be set as "15 * geoOneMinute"
.
Rest stops are added to the route based on IncludeRestStops and TimeBetweenRests properties of the DriverProfile object.
Example
Sub Set30MinuteRestStop()
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 30-minute rest stops and calculate the route
objRoute.DriverProfile.IncludeRestStops = True
objRoute.DriverProfile.RestStopDuration = 30 * geoOneMinute
objRoute.Calculate
End Sub
Note This sample code is specific for use in MapPoint North America; it is for illustration purposes only.