Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plot two or more lists containing SF collections #448

Open
markbidwell opened this issue Jan 25, 2023 · 0 comments
Open

Plot two or more lists containing SF collections #448

markbidwell opened this issue Jan 25, 2023 · 0 comments

Comments

@markbidwell
Copy link

Hello, thanks for making Mapview - it's great!

I'm trying to create a single map using collections of simple features that are contained within three lists. But when I string together mapview commands using the "+" symbol, only the collections of SFs contained in the first list show up on the map (although collections of SFs from all three lists appear in the legend).

There's an example below (with just two lists) and I could put together a reproducible example if that would help.

Thank you! Mark

str(GPS_SF_list[[1]])
Classes ‘sf’ and 'data.frame': 334 obs. of 3 variables:
$ identity : chr "13Horseshoe_2015_0" "13Horseshoe_2015_0" "13Horseshoe_2015_0" "13Horseshoe_2015_0" ...
$ timestamp: chr "2016-01-13 07:43:00 UTC" "2016-01-13 09:00:00 UTC" "2016-01-13 11:00:00 UTC" "2016-01-13 13:00:00 UTC" ...
$ geometry :sfc_POINT of length 334; first list element: 'XY' num 90419 -2723

  • attr(*, "sf_column")= chr "geometry"
  • attr(, "agr")= Factor w/ 3 levels "constant","aggregate",..: NA NA
    ..- attr(
    , "names")= chr [1:2] "identity" "timestamp"

mapview(GPS_SF_list) #creates map of 6 SF collections (point geometry)
mapview(UD_SF_list) #creates another map of 6 SF collections (multipolygon geometry)
mapview(GPS_SF_list) + mapview(UD_SF_list) #creates map of 6 SF collections from first list (point geometry) but doesn't include 6 SF collections from the second list, although the legend does contain objects from second list

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant