title: How to convert polyline with weight to polygon in Leaflet?
body: <p>I need to allow user to draw a route (using polyline) with specified road radius (visually it was done with "weight" parameter).</p>
  
  <p>Visually it looks like that:</p>
  
  <p><a href="https://i.stack.imgur.com/hXjU7.png" rel="noreferrer"><img src="https://i.stack.imgur.com/hXjU7.png" alt="enter image description here"></a></p>
  
  <p>So I'm wondering how can build a polygon around this polyline with some offset? Like this:</p>
  
  <p><a href="https://i.stack.imgur.com/jrcVk.png" rel="noreferrer"><img src="https://i.stack.imgur.com/jrcVk.png" alt="enter image description here"></a></p>