You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
library(mapedit)
#> Warning: multiple methods tables found for 'crop'#> Warning: multiple methods tables found for 'extend'#> Warning: replacing previous import 'DT::dataTableOutput' by#> 'shiny::dataTableOutput' when loading 'mapedit'#> Warning: replacing previous import 'DT::renderDataTable' by#> 'shiny::renderDataTable' when loading 'mapedit'#> Registered S3 methods overwritten by 'stars':#> method from#> st_bbox.SpatRaster sf #> st_crs.SpatRaster sf
library(sf)
#> Linking to GEOS 3.9.1, GDAL 3.2.1, PROJ 7.2.1; sf_use_s2() is TRUEpts<- rbind(list(matrix(c(170800,172000, 5410500, 5410400),2)),
list(matrix(c(170810,172010, 5410580, 5410400),2)))
line<- lapply(pts, FUN=function(x)sf::st_as_sf(sf::st_sfc(sf::st_linestring(x), crs=32612)))
line<- st_as_sf(bind_rows(line))
#class
class(line)
#> [1] "sf" "data.frame"# especially easy with selectFeatures
selectFeatures(line)
#> Error in initBaseMaps(map.types, canvas = canvas, viewer.suppress = viewer.suppress): could not find function "initBaseMaps"
Looks like something with the mapview internal function initBaseMaps. Looked into it and if you add it to the mapview_init.R file it seems to fix the problem for the most recent dev version. However, when using a linestring it doesn't work for mode = 'click'... Looked into the selectMod and selectMap functions but couldn't find the mix-up? I'm not sure if it has to do with the handlers in the JS in particular to 'linestrings' because it works fine with polygons and points 🤷♂️ so not sure. Thanks! Created on 2022-04-04 by the reprex package (v2.0.0)
Looks like something with the mapview internal function
initBaseMaps
. Looked into it and if you add it to themapview_init.R
file it seems to fix the problem for the most recent dev version. However, when using a linestring it doesn't work formode = 'click'
... Looked into theselectMod
andselectMap
functions but couldn't find the mix-up? I'm not sure if it has to do with the handlers in the JS in particular to 'linestrings' because it works fine with polygons and points 🤷♂️ so not sure. Thanks!Created on 2022-04-04 by the reprex package (v2.0.0)
Session info
The text was updated successfully, but these errors were encountered: