Skip to content

Version 0.6.* bug. Multiple Leaflet maps will no longer display correctly when alternating back and forth. #432

@actuarial-lonewolf

Description

@actuarial-lonewolf

Hi,

I'm developing a Shiny Flexdashboard with multiple Leaftlet maps in separate pages.
I expect the user to first see page 1, then move to page 2.
In the event the users goes back to page 1, the map 1 display will be broken with most of the map greyed out.

That buggy behavior is while using Flexdashboard 0.6.0 / 0.6.1.
In previous Flexdashbord version (0.5.2), the display is working correctly.

Note that this behavior is consistent while using either Leaflet 2.1.1 or 2.1.2, or any browser.

Code:


---
title: "Multiple Pages"
output: flexdashboard::flex_dashboard
runtime: shiny
---

```{r setup, include=FALSE}
library(flexdashboard)
library(leaflet)
```
Page 1
=====================================  
    
### Map 1
    
```{r}
 renderLeaflet({ leaflet() %>% addTiles() %>% addMarkers(lng=174.768, lat=-36.852, popup="The birthplace of R")  })
```
   
Page 2
=====================================     

### Map 2

```{r}
 renderLeaflet({ leaflet() %>% addTiles() %>% addMarkers(lng=-77.036560, lat=38.897957, popup="White House")})
```

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions