Roberto
Roberto

Reputation: 327

Quarto R Leaflet map fullscreen not working on mobile

I have a website created with Quarto using R. On the website I have a home page with a slider that takes you to a map (just by clicking on a link). On my computer I can use the full screen button, but on my phone it doesn't work and when I click it I stay on the same page but the map disappears completely.

Has anyone encountered this problem? How do you usually deal with it? The website is often accessed when working in the field, just to get a quick overview of what's around us, and we'd like to have a full screen view.

I have tested this on both Android and iOS.

Thank you in advance for your help.

This Quarto/R chunk uses these tags: panel:fill and column:screen

map = leaflet() %>%
  addProviderTiles(providers$CartoDB.Positron,  group = "Political") %>%
  addProviderTiles('Esri.WorldImagery', group = "Satellite") %>%  
  addLayersControl(...) %>% 
  addResetMapButton() %>%
  addFullscreenControl() %>%
  htmlwidgets::onRender("
    function(el, x) {
      var myMap = this;
      myMap.on('baselayerchange',
        function (e) {
          myMap.minimap.changeLayer(L.tileLayer.provider(e.name));
        })
    }") %>%
   fitBounds(...) %>%
   addLegend(...)

map

Upvotes: 0

Views: 30

Answers (0)

Related Questions