SmoothFactor range linear polyline

According to the LeafLet documentation, PolyLine has the parameter "smoothFactor": http://leafletjs.com/reference.html#polyline which makes it easier to execute the polyline. Does anyone know what a range is (for example, minimum and maximum values), and if you notice a performance improvement with it? I tried different values, such as 0,1, 1, 5, 10, 100 and did not notice changes in zoom / pan performance at all.

+6
source share
2 answers

Default value: 1. Larger numbers will improve performance and smooth polygon shapes. In my experience, I used about 10,000 shapes using smoothFactor=3 . The performance improvement was barely noticeable (1/4 second faster loading time), but the shapes (polygons) were too simplistic, turning almost every shape into triangles and squares.

+2
source

Source: https://habr.com/ru/post/972725/


All Articles