title: Leaflet addPolylines is not plotting all values (or lines) of a data object
body: <p>I'm using <code>addPolylines</code> to overlay contours of a specific value(s) on a <code>leaflet</code> generated web map, however, <code>addPolylines</code> is not plotting all the data that it is supplied with. As per the first image, at least two regions of a value of <em>125</em> are evident, but leaflet generated map displays only one region. <br>The data can be downloaded from <a href="https://www.dropbox.com/s/58u0axcaezniw4h/AnnualPrcpValues.txt?dl=0" rel="nofollow noreferrer">here</a>, and reproducible script that generates SpatialLinesDataFrame object for <code>addPolylines</code> and <code>leaflet</code> generated map as follows:</p>
  
  <pre><code>rm(list=ls())
  library(leaflet)
  library(maptools)
  
  # create a vector of lon, lat, and read data
  lon1 &lt;- seq(-124.938,length=59,by=1)
  lat1 &lt;- seq(25.063,length=29,by=1)
  data1 &lt;- matrix(scan(file="AnnualPrcpValues.txt"),ncol=length(lat1),byrow = T)
  
  ## spatial pattern of precipitation
  ## I choose a value *125* correspond to light yellow color to plot contours on leaflet generated map
  ## at least two regions corresponds to this value, i.e., Pacific northwest &amp; Southwest region] 
  filled.contour(lon1,lat1,data1,color=terrain.colors)
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/Ka7sK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Ka7sK.png" alt="Precipitation patterns"></a></p>
  
  <pre><code>## The following code calculates contour lines correspond to a value *125*
  ## and then converts contour lines into a SpatialLinesDataFrame object
  
  CL=contourLines(lon1,lat1,data1,levels=c(125))
  c.linesSP &lt;- ContourLines2SLDF(CL)
  </code></pre>
  
  <p><code>c.linesSP</code> has co-ordinates for three lines, but, <code>addPolylines</code> plots contours only for one region </p>
  
  <pre><code>str(coordinates(c.linesSP))
  
  ##List of 1
  ## $ :List of 3
  ##  ..$ : num [1:17, 1:2] -123 -122 -122 -122 -122 ...
  ##  ..$ : num [1:5, 1:2] -125 -124 -123 -124 -125 ...
  ##  ..$ : num [1:9, 1:2] -86.4 -86.9 -87.9 -88.9 -89.9 ...
  </code></pre>
  
  <p><br></p>
  
  <pre><code>## leaflet generated map
  map1 &lt;- leaflet() %&gt;% addTiles() %&gt;% 
     setView(lng = -80, lat = 40, zoom = 2)
  map2&lt;- map1 %&gt;% addPolylines(data=c.linesSP,color="red")
  
  ## It should have three lines, but only one line is seen in the Pacific Northwest region
  map2
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/NP4CG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NP4CG.png" alt="WebMap with one Contour Line"></a></p>
  
  <pre><code>## However, contour line in the southwest region is plotted when explicilty co-ordinates, i.e., [[1]] [[3]] are supplied
  ## 
  tempdata &lt;- coordinates(c.linesSP)[[1]][[3]]
  map2 %&gt;% addPolylines(tempdata[,1],tempdata[,2],
                           weight=1.25,color="green") %&gt;%
     addMarkers(tempdata[,1],tempdata[,2])
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/YiMuj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YiMuj.png" alt="Webmap with two contour lines"></a></p>
  
  <p>It is not clear why <code>addPolylines</code> is not plotting all the coordinates that it supplied with initially. Greatly appreciate suggestions.</p>