Skip to main content

Questions tagged [r-leaflet]

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

320 questions with no upvoted or accepted answers
9 votes
0 answers
242 views

Increase size of rleaflet map in Jupyter Lab display (R in Jupyter)

When using R and rleaflet in a Jupyter Lab Notebook. My output map is short and wide with a vertical scroll box, and I can find no means of increasing it's height. # Code to reproduce library(leaflet)...
Colin Talbert's user avatar
6 votes
2 answers
1k views

How to upload a shapefile into a Shiny app?

I am trying to figure out how, using Shiny App, a user can submit a shapefile via fileInput and then map it on a leaflet basemap. I am stuck on the server.R script and unsure how to handle the user ...
dwiz's user avatar
  • 460
5 votes
1 answer
376 views

raster and polygons in leaflet, without raster interpolation

I'm trying to display several layers in leaflet (or mapview), one of which is a raster in EPSG:27700. The only way I manage to adequately overlay those layers is through the default latlong projection,...
Yollanda Beetroot's user avatar
5 votes
0 answers
2k views

Why have I lost ability to use mapshot

I've been using mapshot a lot to send interactive maps of data but recently, although I can make the maps I want with mapview, I can't save them. Example: map<- mapview(mapdata, zcol = "...
Sissiboon's user avatar
5 votes
0 answers
265 views

Zoom shiny leaflet world map to full width

Does anyone know how to set default render zoom of a Shiny Leaflet map so a full world map zooms to fit the window width (i.e. -180° to 180° properly fits the window)? I can only set zoom to integers,...
geotheory's user avatar
  • 23.3k
5 votes
0 answers
247 views

Using SelectAreaFeature plugin with Leaflet for R

I am trying to use the SelectAreaFeature Leaflet JS plugin with Leaflet for R. I have had success using other Leaflet JS plugins, but not the SelectAreaFeature plugin. Here is an MRE (requires the ...
fifthace's user avatar
  • 536
5 votes
0 answers
449 views

How to project a raster + polygons in Lambert 93 with leaflet on R?

I'm trying to make a leaflet map in Lambert 93 (st_transform(2154)) composed of: 1. Polygons (France) 2. Raster Layer (Europe) I can't understand why the following code is not working. library(...
antuki's user avatar
  • 236
5 votes
0 answers
5k views

Sort legend (for colorFactor) using leaflet package (RStudio) in Shiny App

I'm deploying a shinyapp using the new leaflet package developed by RStudio. There doesn't appear to be much documentation online about some elements - in my case, I need to specify the order in which ...
Jonny's user avatar
  • 2,763
4 votes
0 answers
140 views

Shinylive app doesn't render leaflet map tiles

I am trying to move an r-Shiny app onto a website using the shinylive package. The app is exported to HTML and it is functional, except that a leaflet map that is embedded in the site does not render ...
SGE's user avatar
  • 410
4 votes
0 answers
831 views

How to change legend text formatting in Leaflet in R?

I've created a leaflet map and I'm trying to figure out how I can change the formatting of the legend labels. I currently have a gradient color palette to represent the data, with a set of discrete ...
nkt95's user avatar
  • 65
4 votes
0 answers
822 views

R Shiny addPolygons fails in leafletproxy but works in leaflet()

I am trying to create a leaflet map that adds and removes a polygon layer (SpatialDataFrame) based on changing user inputs into a flexdashboard Shiny App. The geometry of the polygons (4201 polygons) ...
DarwinsBeard's user avatar
4 votes
0 answers
204 views

remove mapedit features programmatically

With mapedit it is possible to clear drawn features using the 'trash' icon built into the drawbar UI. It is also possible to clear features associated with the leaflet map using clearMarkers() and ...
sebdalgarno's user avatar
  • 3,159
4 votes
0 answers
445 views

Make Shiny Leaflet recognise a map created from an externally hosted JS file

I would like to use Shiny Leaflet to render an already existing leaflet map, but problems arise since the initial map is created from an externally hosted (rather complicated) JS file, which I do not ...
KarlJensen's user avatar
4 votes
0 answers
900 views

R leaflet map, add button that expands on hover and shows some text

Expanding on an example from addEasyButton in RStudios leaflet package, I wonder if it is possible to create a button that automatically expands on hover to show some text? Something like the code ...
TimSalabim's user avatar
  • 5,814
4 votes
1 answer
1k views

Show Polylines when mouse hover on Circles in leaflets in R

I have a flow Map - using leaflets in R library(leaflet) m <- leaflet(AM_Peak) %>% addTiles('http://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}.png', attribution='Map tiles by <a href="...
Prasanna Nandakumar's user avatar

15 30 50 per page
1
2 3 4 5
22