Parameters
- polyline
- The polyline in which to set the M-values.
- origin
- Determines whether to start measuring distance from the start or end of the polyline part. Measurement starts at the start or end point that is closest to origin.
- scale
- The value by which the cumulative length of the polyline is multiplied.
- offset
- The value that is added to the scaled cumulative length of the polyline.
- ignoreGaps
- Determines whether distances between parts of the polyline should be ignored or not.
Return Value
Polyline with M-values set. If the input polyline is empty, then it is returned unchanged.