javascript - Changing the Length of drawn polyline : leaflet -


i new in using leaflet. can tell me how change length of drawn polyline in leaflet?. want make length small or large depending on zoom level.

leaflet polyline array of points, each of them consist of lat , lng. change it's size need update array , change distance between points width setlatlngs() method.

if want fit screen need screen bounding box width map.getbounds() lat or lng bbox , update line width it.

so this:

 map.on('zoomend', function(){    var bounds = map.getbounds();    line.setlatlngs(bounds[0],bounds[1]);  }) 

Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -