Questions tagged [r-leaflet]

This R package makes it easy to integrate and control the open-source JavaScript Leaflet software in R.

499 questions
2
votes
1 answer

How can I programmatically create a list of objects of the leaflet icon class?

How can I programmatically create a list of objects of the leaflet icon class? I have created a map using the leaflet library that will eventually show dozens of locations. For this I want to add some custom icons using the addMarkers function,…
SlowLearner
  • 7,907
  • 11
  • 49
  • 80
2
votes
0 answers

lock aggregating/zoom from leaflet heatmap

I would like to stop the splitting of the heatmap when zooming in. In the example below, whenever you zoom in, the heatmap is reconstructed, re-aggregating the points into new, thinner, heat zones. However, I want to lock the "heat zone" at a…
Felipe Alvarenga
  • 2,572
  • 1
  • 17
  • 36
2
votes
1 answer

Disabling zooming when scrolling over leaflet map in R

i want to disable zooming on my leaflet map in R while having the mouse hover over it. I tried the suspendScroll(hoverToWake = FALSE) function from the leaflet.extras package as well as leaflet(options = leafletOptions(scrollWheelZoom = FALSE)), but…
VSZ
  • 21
  • 1
2
votes
1 answer

Remove specific Layers in R Leaflet

My shinyApp is composed of two zone, a map and a chart. You can select an area in the chart which will update data on the map coresponding to the selected chart area. So the map is using an observe and a leafletProxy to add filtered Data so as a…
Oscar Jnn
  • 154
  • 1
  • 19
2
votes
0 answers

Add marker on leaflet when selecting from filter in flexdashboard for R

I am quit new to R and trying to develop an dashboard with Flexdashboard based on this example: https://matt-dray.github.io/earl18-crosstalk/04_leaflet-flexdash-dt-crosstalk.html I get it to work, but what I am trying to accomplish is that I don't…
Stefan
  • 209
  • 2
  • 9
2
votes
1 answer

How to make Multipolygons with Package SF and dplyr

How can I use dplyr to collapse an sf map object into multipolygons geometry? When I use group_by and summarise, the default resultant geometry appears to be a MULTIPOINT sfg class. I am looking to plot 3 distinct polygons (1 for each 'area' value)…
CallumH
  • 751
  • 1
  • 7
  • 22
2
votes
0 answers

RMarkdown cyrillic encoding of leaflet popup

On my windows machine I got this encoding problems. I'm making an interactive map using leaflet and rmarkdown. The point is, that map title and popup should be in Russian. When I'm just creating a leaflet object, everything works…
atsyplenkov
  • 1,158
  • 13
  • 25
2
votes
1 answer

How to bind csv-data to geojson with Leaflet in R

In R (shiny) I'm using Leaflet. I want to use a geojson file with polygons; each polygon has an id. I also want to use a csv-file with measurements for every id in the geojson. My question is: Do I have to merge these files first before I can use…
MacMax
  • 35
  • 1
  • 5
2
votes
1 answer

Data issue: addAwesomeMarkers requires lng, lat, but my data is stored in a vector. Work around?

I am working on a map with Leaflet in R. My data is stored as x,y coordinates, which are now transformed into lng, lat values. Dataset: Dambrug2019 (my own dataset, just to avoid confusion in the next code sample). Name Status x …
JS93
  • 25
  • 5
2
votes
1 answer

draw a bar based on a value of column in a map

I am using map deck to draw nearly 100K points, is it possible instead of a dot, show a bar based on a value of a column installed library(mapdeck) library(htmlwidgets) dataset =data.frame(stringsAsFactors=FALSE, x = c(143.4865219,…
Mim
  • 999
  • 10
  • 32
2
votes
1 answer

Creating a choropleth map with point data using voronoi created surface_polygons in Leaflet

I have a tricky issue. I am trying to visualise some data in for a sort of 'pretty' meta data explorer. It's basic point data in the following format: > print(tempdata[1:5, ]) Station Lat_dec Long_dec Surface_T 1 247 50.33445 -2.240283 …
Jim
  • 558
  • 4
  • 13
2
votes
1 answer

Creating leaflet.minicharts popup labels for many different plots

I am using R leaflet.minicharts to create plots for each of several input files. I would like to create custom labels for each of the pie charts or bar plots within each minichart plot, but am having trouble with the code. I have a data frame (df)…
nrcombs
  • 503
  • 3
  • 17
2
votes
1 answer

Click polygon and will updateselectinput() - (using leaflet R)

Currently i've managed to align the data with the shape file and plot each region to the map. The polygon is added layer to segregate each region giving more information to whats going on in that region. what i'm trying to do is that, user should be…
2
votes
1 answer

How to apply CSS styling to modularized shiny code?

I am try to stylize my UI in a shiny app that I am making. I had previously built a fairly comprehensive map that I now have to modularize to improve readability. Unfortunately, I cannot seem to understand how to go about applying CSS styles while…
ANam
  • 337
  • 2
  • 15
2
votes
0 answers

Shiny module: To return multiple reactive outputs from a single function in a module (linking a leaflet map and data table)

I'm coding a Shiny module to link a leaflet map with a data table (the code is based on Shiny - how to highlight an object on a leaflet map when selecting a record in a datatable?). The difficulty I'm having is passing some rendered text…
Richard
  • 95
  • 2
  • 11