Function resamplePath
Parameters
- path: [number, number][]
An array of coordinate pairs [longitude, latitude] representing the path to resample
- spacing: number = 10
The desired spacing between points in the resampled path (in the same unit as used by the distanceTo method), defaults to 10
Returns [number, number][]
A new array of coordinate pairs representing the resampled path with approximately equal spacing between points
- path: [number, number][]
Was this helpful?
Resamples a geographic path to have points spaced at approximately equal distances. If the original path has fewer than 2 points, it is returned unchanged.