simplify static method

List simplify(
  1. List points,
  2. List tolerance
)

Dramatically reduces the number of points in a polyline while retaining its shape and returns a new array of simplified points, using the Douglas-Peucker algorithm.

Used for a huge performance boost when processing/displaying Leaflet polylines for each zoom level and also reducing visual noise. tolerance affects the amount of simplification (lesser value means higher quality but slower and with more points).

Implementation

external static List simplify(List points, List tolerance);