mapview icon indicating copy to clipboard operation
mapview copied to clipboard

Condition has length > 1 when burst=T and row-selection

Open jhagenauer opened this issue 2 years ago • 2 comments

Thank you for this great pice of software!

Given the following code:

library(mapview)
library(sf)

data <- data.frame(   
  species = c("APP", "ASA", "ASL", "APP", "ASA", "ASL"),   
  lng = c(-1.52, -2.50, -2.63, -2.33, -2.05, -2.54),   
  lat = c(48.23, 47.87, 48.37, 47.77, 47.57, 48.17)  
)

d_sf <- st_as_sf(data[1:5,], coords = c("lng", "lat"), crs = 4326)
mapview(d_sf,zcol = "species", burst = T)

It results in:

Error in if (unique(sapply(x, nrow)) == length(popup)) { : the condition has length > 1

If I select all of data, no problem. Not sure what could be wrong. mapview-version is 2.11.0 und R 4.2.1

jhagenauer avatar Jun 22 '23 12:06 jhagenauer

I think this is already fixed in the dev version (#420) but not yet released on CRAN.

markolipka avatar Jun 22 '23 18:06 markolipka

Hello, I have the same issue.

Nicolescm avatar Jun 27 '23 04:06 Nicolescm