All Questions
96
questions
10
votes
1
answer
544
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 ...
-1
votes
1
answer
299
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 ...
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 ...
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 ...
1
vote
1
answer
251
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 ...
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 ...
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).
---
...
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 ...
1
vote
0
answers
543
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 ...
3
votes
1
answer
519
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 ...
6
votes
1
answer
321
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(&...
7
votes
2
answers
1k
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 ...
0
votes
1
answer
950
views
R leaflet: adding an information popup using easyButton
I am building a leaflet map within R Studio and I want to place an information icon on the top-left of the map as an easyButton which allows users to click and popup some text information with some ...
0
votes
1
answer
233
views
Show and hide Datatable upon button click on leaflet map in R
I drawn a map with a 'datatable' using some packages in R. To have more space in leaflet map, I need a button to show/hide the datatable part. How to do it? The R code is below:
library(leaflet)
...
6
votes
2
answers
2k
views
Use lasso instead Rectangle for select reign in Leaflet
I am trying to show a leaflet map using R(I can not use Shiny package). I use a 'DT', 'crosstalk' and 'leaflet' packages to calculate the mean of a column for selected data in map. In the map, it ...