A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/SymbolixAU/mapdeck/issues/349 below:

`repeat_view = TRUE` does not work within Shiny · Issue #349 · SymbolixAU/mapdeck · GitHub

Describe the bug
repeat_view = TRUE leads to a frozen view within Shiny with the browser console returning plenty of Uncaught TypeError: cyclic object value

To Reproduce

library(data.table)
library(sf)
library(mapdeck)
library(shiny)

key <- "***"
set_token(key)

n <- 1000L; x0 <- -179; y0 <- -42
pts <- data.table(x = rnorm(n, x0, 2), y = rnorm(n, y0, 2), indiv = sample(LETTERS, n, repl=T))
pts <- st_as_sf(pts, coords = c('x', 'y'), crs = 4326, remove = F)

shinyApp(
    ui = fluidPage(mapdeckOutput('map', height='800px')),
    server = function(input, output) {
        output$map <-renderMapdeck({
            mapdeck(location = c(x0, y0) , zoom = 3 ,
                    style = 'mapbox://styles/mapbox/dark-v10' , show_view_state = TRUE ,
                    repeat_view = TRUE) %>%
                add_scatterplot(data = pts , fill_colour = "indiv" , fill_opacity = 0.5 ,
                                stroke_opacity = 0 , radius_min_pixels = 2 ,
                                palette = 'rainbow_hcl')
        })
    }
)

Expected behaviour
Features on both sides of the international date line should get displayed with repeat_view=TRUE. This option is essential when dealing with features around the date line, as otherwise half of them disappear when dragging the view left or right.

Versions

sessionInfo()
R version 4.1.2 (2021-11-01)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.3 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.9.0
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.9.0

locale:
 [1] LC_CTYPE=en_NZ.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_NZ.UTF-8        LC_COLLATE=en_NZ.UTF-8    
 [5] LC_MONETARY=en_NZ.UTF-8    LC_MESSAGES=en_NZ.UTF-8   
 [7] LC_PAPER=en_NZ.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_NZ.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] shiny_1.7.1       mapdeck_0.3.40003 sf_1.0-4          data.table_1.14.2

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.7         jquerylib_0.1.4    bslib_0.3.1        pillar_1.6.4      
 [5] compiler_4.1.2     later_1.3.0        class_7.3-19       tools_4.1.2       
 [9] digest_0.6.29      jsonlite_1.7.2     lifecycle_1.0.1    tibble_3.1.6      
[13] pkgconfig_2.0.3    rlang_0.4.12       DBI_1.1.1          yaml_2.2.1        
[17] fastmap_1.1.0      e1071_1.7-9        dplyr_1.0.7        sass_0.4.0        
[21] generics_0.1.1     vctrs_0.3.8        htmlwidgets_1.5.4  classInt_0.4-3    
[25] grid_4.1.2         tidyselect_1.1.1   glue_1.5.1         R6_2.5.1          
[29] jsonify_1.2.1      fansi_0.5.0        purrr_0.3.4        magrittr_2.0.1    
[33] promises_1.2.0.1   ellipsis_0.3.2     htmltools_0.5.2    units_0.7-2       
[37] assertthat_0.2.1   xtable_1.8-4       mime_0.12          httpuv_1.6.3      
[41] utf8_1.2.2         KernSmooth_2.23-20 proxy_0.4-26       cachem_1.0.6      
[45] crayon_1.4.2      

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4