Closed edzer closed 8 years ago
The problem is obviously related with addPolylines
from leaflet that seemingly drops all but the first continuous sub-line in an otherwise discontinuous (i.e., segmented) line. For example,
leaflet(x) %>% addTiles() %>% addPolylines()
behaves similar to mapview(x)
. I implemented a temporary workaround to display all line segments regardless of whether or not the line is broken. Edzer, since I assume you are familiar with the storms
dataset, could you please compile the latest version of the 'devel' branch (1.0.11) and evaluate if the output of mapview(x)
, particularly the pop-up assignment, now looks correct? Please note that this currently works with burst = FALSE
only.
Thanks! For SpatialLinesDataFrame
it now works, for SpatialLines
it doesn't. Shall I write an issue for leaflet?
It shouldn't cost too much effort to transfer this approach to SpatialLines
. Since the problem arises from addPolylines
, however, I think that it would be desirable if this could be handled from the leaflet side in the long run (not least because there are far more leaflet users out there).
It's already there: https://github.com/rstudio/leaflet/issues/213
Just for the record, mapview
support for SpatialLines
is now enabled as well.
Try:
it seems that only the first
Line
of aLines
object is plotted.