title: Length buffer around polyline
body: <p>I'm not very good at mathematics, so I got a problem. I have a route from one, to another distination. Some time I was trying to apply a colored plot aroud the route in fixed length. But I cant get a nice rounded corners and my lack of math is making me a lot of truble.</p>
  
  <p><strong>Now I got this</strong>
  <img src="https://i.stack.imgur.com/yRMyL.jpg" alt="enter image description here"></p>
  
  <p><strong>And the code</strong></p>
  
  <pre><code>        var r = [];
          var bla = result.routes[0].overview_path;
          for(i in result.routes[0].overview_path) {
              r.push(new google.maps.LatLng(bla[i].lat()+z, bla[i].lng()-z));
          }
          bla.reverse();
          for(x in bla) {
              r.push(new google.maps.LatLng(bla[x].lat()-z, bla[x].lng()+z));
          }
  
          var kelias = new google.maps.Polyline({
              path: result.routes[0].overview_path,
              strokeColor: "#00000",
              strokeOpacity: 1.0,
              strokeWeight: 2
          });
  
          kelias.setMap(MAP);
  
          fonas = new google.maps.Polygon({
              paths: r,
              strokeColor: "#FF0000",
              strokeOpacity: 0.8,
              strokeWeight: 2,
              fillColor: "#FF0000",
              fillOpacity: 0.35
          });
  
          fonas.setMap(MAP);
  </code></pre>
  
  <p><em>I just want to ask for some information directions OR maybe some of you already have made this functionality and have some functions</em></p>
  
  <p>Working <a href="http://gis5.com/pois_along_route/gm_pois_along_route.php" rel="nofollow noreferrer">demo here</a>. Somehow i need to get same result of drawing that.</p>
  
  <p><strong>SOLUTIONS</strong></p>
  
  <ul>
  <li><a href="https://coderwall.com/p/zb_zdw/buffered-polyline" rel="nofollow noreferrer">Buffered polyline using JSTS lib.</a> </li>
  <li><a href="http://pro.arcgis.com/en/pro-app/help/editing/buffer-polyline-.htm" rel="nofollow noreferrer">ArcGIS server solution</a></li>
  </ul>