title: Longitude and Latitude of polyline : Leaflet
body: <p>Is their a way to get latitude and longitude of polyline? </p>
  
  <pre><code>var firstpolyline = new L.Polyline(pointList, {      
      color: 'black',        
      opacity: 5,       
      smoothFactor: 1,    
      weight: 3,
  })
  
  map.addLayer(firstpolyline);
  firstpolyline.getLatLng();
  </code></pre>
  
  <p>here firstpolyline is givng an error that "getLatLng() is not a function". I want to check if polyline is within the map bound or not like this </p>
  
  <pre><code>var bounds = map.getBounds();
  if(bounds.contains(firstpolyline.getLatLng())){
      ......
  }
  </code></pre>