MaxSpeedOnSegment constructor

MaxSpeedOnSegment(
  1. SegmentReference segment,
  2. double baseSpeedInMetersPerSecond
)

Creates a new instance.

  • segment A segment for which the new base speed is specified. Only the segmendId and travelDirection parameters are used, other parameters are ignored. Setting a segmendId is 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.

  • baseSpeedInMetersPerSecond New 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);