Skip to content

[bug] map not showing in modal second click  #266

Description

@noamanemobidata

Hi! The map is not displayed inside a modal on the second invocation. (click modal button for the second time, it works the first time )

library(googleway)

ui <- fluidPage(
  actionButton("sect",label = "show")
)

server <- function(input, output, session){
  
  
    output$mapl <- renderGoogle_map({
    
    google_map( update_map_view = F,
                styles = map_styles()$silver,
                key = map_key,
                geolocation = F, height = "100%",
                search_box = F,
                # libraries = c('visualization', 'geometry','places'),
                scale_control = T,
                street_view_control = F,
                map_type_control = F,
                rotate_control = T,
                zoom_control = T,
                fullscreen_control = F,
                location = c(50.6062442, 3.1148086)
    )%>%
      add_drawing(drawing_modes = c("polygon"))
    
  })
  
  
  observeEvent(input$sect,{

    showModal(session = session, 
      
      
        modalDialog(size = 'l',easyClose = T , 
                    google_mapOutput('mapl')
      
    )
    )
    
  })
  
}
shinyApp(ui, server)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions