Skip to main content

All Questions

Tagged with
10 votes
1 answer
528 views

Load Quarto html map data from json for Leaflet map generated in R

I have created a Quarto blog post which contains many leaflet maps, generated in R. As the data for each map is embedded within the html file, the file itself is very large. This is causing problems ...
SamR's user avatar
  • 16.4k
0 votes
0 answers
183 views

Toggle Legends in leaflet map generated in R based on base layer selected

I have created a polygonal choropleth map in leaflet that toggles different geometries and legends on the regional and county (parish) level. The code works, but I made the addLayersControl toggle on ...
Gabriel Necula's user avatar
-1 votes
1 answer
291 views

R leaflet in Shiny, layer opacity controled by sliderInput

I am developing a shiny app with leaflet and several added polygons, and I want to control the polygons opacity with a sliderInput(). I have a working solution that restart addPolygons() when the ...
GaelS's user avatar
  • 670
1 vote
1 answer
638 views

leaflet in Shiny: save click coordinates

I have a Shiny app where the goal is to send the user's location to a database. The app automatically detects the user's location, and assigns that to input$lat and input$long. The app also has a ...
Ralph Asher's user avatar
0 votes
1 answer
84 views

Why does the shiny app give me an error when trying to use osrm trip in a reactive()?

Hello and thanks for reading me. I am trying to make an app that generates a route to the closest location of the dataframe considering the current location, but when doing the calculations in shiny ...
Jorge Hernández's user avatar
1 vote
1 answer
360 views

R Shiny leaflet: how to query a Web Map Service layer with a fake click?

I'm trying to display the information tooltip of a queryable WMS (Web Map Service) layer in a leaflet in Shiny. I need it to be performed in 2 different ways: 1/ clicking 2/ typing in coordinates. ...
Dric's user avatar
  • 107
1 vote
0 answers
145 views

Leaflet.LabelTextCollision plugin doesn't work in R with leaflet

Leaflet.LabelTextCollision plugin is a usefull feature for spatial visualisation. It hides labels on the map, which overlap with each other. I try to use Leaflet.LabelTextCollision in R with leaflet ...
nicksinus's user avatar
1 vote
1 answer
245 views

How to prevent BringToBack from reversing layers order of FeatureGroup in Leaflet

I have a Leaflet Map on a Shiny web-app. I have 3 Base Groups containing different circles, and 1 Overlay Group containing polylines crossing each other. The polylines are sorted so that the more ...
Mattéo Camin's user avatar
1 vote
1 answer
1k views

Add an opacity slider to a leaflet map generated in r

I would like to add an opacity slider to a leaflet map generated in r. It should change the opacity of the uppermost visible or all visible layers (either of the two, I don't mind). I found helpful ...
Beni's user avatar
  • 251
3 votes
1 answer
1k views

Adding a 'click' event to leaflet polygons via R

How can I add a mouse 'click' event to each polygon plotted on a leaflet map? I want to do this so I can then filter a separate widget based on data from the features (in this case WD21CD). --- ...
Chris's user avatar
  • 1,503
1 vote
0 answers
126 views

Exporting R-leaflet applications as html with full source code

since updating my R verison, R-leaflet applications exported (e.g via saveWidget(map, "map.html", selfcontained = T) don't show the full source code any more but instead reverence different ...
ClaraH's user avatar
  • 11
1 vote
0 answers
541 views

MiniCharts Library in R Leaflet- Popup Legend Options

I am using the minicharts package (https://www.rdocumentation.org/packages/leaflet.minicharts/versions/0.6.2) in a leaflet map of mine. It works as expected, however, I wish I could adjust the pop up ...
aholtz's user avatar
  • 155
3 votes
1 answer
514 views

R Shiny leaflet stop zoom on scroll and use ctrl + scroll to zoom the map & move map with two fingers on mobile?

I am creating 100 + leaflet maps in my shiny app. The maps are 100% of the width of the page, so when the user goes to scroll down the page it zooms the map but I would like it to continue scrolling ...
Brooke Gibbons's user avatar
6 votes
1 answer
318 views

R & Leaflet: how to bind a client-side event to a polygon

Here is a simple shiny app: library(shiny) library(leaflet) nc = sf::st_read(system.file("shape/nc.shp", package="sf")) ui <- function(request){ tagList( selectInput(&...
Colin FAY's user avatar
  • 5,059
7 votes
2 answers
996 views

Pie charts in R leaflet, turn count into sum and control more the size

I am fascinated by the solution of grouping markers and presenting counts by groups in form of small piecharts https://stackoverflow.com/a/60525137/3480717 I am R only and do not know JS. I would like ...
Jacek Kotowski's user avatar

15 30 50 per page
1
2 3 4 5
7