MaxSpeedOnSegment constructor - MaxSpeedOnSegment - routing library - Dart API
MaxSpeedOnSegment
MaxSpeedOnSegment constructor
- SegmentReference segment,
- double baseSpeedInMetersPerSecond
Creates a new instance.
segmentA segment for which the new base speed is specified. Only thesegmendIdandtravelDirectionparameters are used, other parameters are ignored. Setting asegmendIdis mandatory.
Note: The SegmentReference is not directly accessible from the map via the HERE SDK.
Although, after route calculation you can retrieve the related segments for each Span.
The segment IDs are the same that are also used by, for example, the Routing REST API.
These IDs are mostly stable and only change when the underlying map data changes
due to a new road or similar changes in the real world.
baseSpeedInMetersPerSecondNew maximum value in m/s of baseSpeed on segment. The provided value must be in the range [1.0, 70.0]. Cannot increase base speed on segment. If the value is greater than the default base speed, then such penalty will have no effect.
Implementation
MaxSpeedOnSegment(this.segment, this.baseSpeedInMetersPerSecond);