According to LeafLet documentation PolyLine has a "smoothFactor" parameter : http://leafletjs.com/reference.html#polyline which allows polyline simplification to improve performance. Does anyone know what is the range (e.g. min and max values) and if you noticed a performance improvement using it? I tried different values like 0.1, 1, 5, 10, 100, and did not notice a change in zoom/panning performance at all.
Here is a demo: "example of leaflets built-in Simplification - Polyline_smoothFactor"
The default value is 1. Larger numbers will improve performance and smooth polygon shapes. In my experience I ran about 10,000 shapes using smoothFactor=3
. The performance improvement was barely noticeable (1/4 of a second faster loading time) but the shapes (polygons) were way too simplistic, turning almost every shape into triangles and squares.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With