There doesn't seem to be a way to set the map dimensions when it is created in a Shiny interactive document (.Rmd file with runtime: shiny). In this case the map is rendered using renderLeaflet() and the default parameters to leafletOutput() are used. Is there a way to do this? Thanks!
You can explicitly put in a leafletOutput and output$leafletid <- renderLeaflet({...}). Ugly but effective :)
Thanks! It took me a little while to understand your response, partly because there is no explicit output variable in my .Rmd file. Here is what worked:
output$mymap = renderLeaflet({...make a map...})
leafletOutput('mymap', height=600)
That's exactly right. Sorry for not providing an example, I was on my phone.
I know it's a little confusing that the output variable just exists--the same is true for the other common Shiny variables, input and session.
Most helpful comment
Thanks! It took me a little while to understand your response, partly because there is no explicit
outputvariable in my .Rmd file. Here is what worked: