Skip to main content

All Questions

Tagged with
2 votes
3 answers
3k views

Making Leaflet Map fullscreen in RShiny

I'm having trouble making my leaflet map in Shiny go fullscreen. While I can obviously just manually set the width and height of the map to my screen-size, I'd like to the map to adapt to whatever ...
0 votes
0 answers
113 views

R Shiny Leaflet map doesn't center properly after expanding the container

I have a Shiny app that correctly collapses the datatable beneath a leaflet map, extends the map and then also brings back the datatable with a button click. The problem is something happens to the ...
2 votes
1 answer
327 views

Putting a leaflet map in a "Picture Frame" in R

I am presently in the process of building an R package that allows users to make custom souvenir maps of their flights, road trips and the cities they visit. I am in the process of trying to figure ...
3 votes
3 answers
3k views

Placing leaflet controls side-by-side instead of vertically stacked in R/Shiny with HTML/CSS

What I want to do is pretty simple: I want my leaflet controls to be aligned side-by-side in rows rather than vertically as columns (as leaflet automatically does). Here is some short example code: ...
1 vote
1 answer
594 views

Making a leaflet map fullscreen in an RShiny dashboard

I'm working on creating an RShiny dashboard with a leaflet map; I want my map to be fullscreen, but I can't quite seem to get the borders/margins to go away. I have tried the solutions offered in a ...
0 votes
1 answer
382 views

How to add triangles when customizing a leaflet legend in R?

I started with this post and the code from @Hallie Swan works great, but I want to change the last shape in the legend into a hollow triangle. My impression is that it's challenging to draw a hollow ...
8 votes
1 answer
11k views

Custom legend with R leaflet

I am using R leaflet to produce a leaflet map. I was able to change the border of my legend by adding to my css file (after saving the leaflet map on my computer) .legend { padding: 6px 10px 6px ...
0 votes
2 answers
456 views

RShiny: Trying to centre my leaflet but I want the legend to stay left justified

I've searched around google and stack overflow but haven't found this question asked before. Basically I want to centre my leafletOutput and have done so with this code: UI <-fluidPage( fluidRow(...
0 votes
2 answers
278 views

How to change css in rmarkdown cell & shiny?

I am relatively new in r and creating leaflet plot for which I need a white background instead of grey. I came across this SO post for same: blank, white background for leaflet map & tried: Plot ...
0 votes
0 answers
88 views

How to change color of leaflet map around the polygon shape in r? [duplicate]

I am using a shape file in leaflet plot & would like to have white color space external to the outer boundary of polygon shape instead of default greyish color background like color but unable to ...
0 votes
1 answer
246 views

R: Using browsable() in leaflet resulting in a smaller screen height

I build a leaflet in R like this: my_leaflet <- my_data %>% leaflet (options = leafletOptions( - ) %>^% addProvidersTiles( - ) setView( - ) %>% addMarkers ( -- ) %>% addCircleMarkers( - ...
3 votes
1 answer
2k views

Custom markerCluster for two groups in leaflet

Assume a data.frame has column "group" with unique values "group1" and "group2". In leaflet, we can assign these groups a color with ColorFactor(). We can also change ...
1 vote
1 answer
552 views

How to make map full-size in R Shiny?

I saw similar issue here on SO (How to get Leaflet for R use 100% of Shiny dashboard height) and this solution worked for me when I used shinydashboard. Now, I changed to bs4Dash library (version 2.0....
1 vote
0 answers
215 views

R Leaflet - How to combine text and figure in popup?

I would like to combine text and a figure in a Leaflet Popup. I saw this on a website of Deutsche Bahn: Multi-Object-Popup Website: strecken.info For me it would be sufficient to combine two of these ...
9 votes
1 answer
6k views

Circles in legend for leaflet map with addCircleMarkers in R - without shiny

I am creating a leaflet map in R - I don't need to build a shiny app, and haven't tackled that particular skill set yet! I was trying to follow along with this post here to create circles in my ...

15 30 50 per page