Considering custom Feature Layers by applying relative speed

The custom Feature Layers can be used to set a relative speed for a segment ; i.e. set a percentage to be used to decrease/increase the speed on a segment.
Using the relative speed, it is possible to apply a generic factor on all speeds of all selected segments.
The defined factor also applies on speed coming from all other FeatureLayers ; i.e. PTV_SpeedPatterns, PTV_TrafficIncidents,... or even PTV_RoadAttributes (using the absoluteSpeed property.

The following code sample exposes how to apply relative speed to a segment.

When creating the Feature Layer, a relative speed of 50% is set on the segment. This relative speed is then considered during the routing.

Please note that the relative speed applies all other speeds coming from all sources ; i.e. the map, PTV_SpeedPatterns, PTV_TraficIncidents, or any other FeatureLayers.