Skip to main content

All Questions

Tagged with
2 votes
1 answer
1k views

How to change legend text color in leaflet for R?

I created a leaflet map in R Shiny. The problem is that the legend text color is very bright. I need to change the text color but don't find any option in leaflet legend for changing the legend text ...
Nina Omani's user avatar
5 votes
1 answer
2k views

leaflet legend name in two lines

I am trying to place the name of the legend in tow rows, but the usual way does not work. Can you help me to identify the reason? library(leaflet) dfXL = data.frame( lat = as.numeric(c("-...
yuliaUU's user avatar
  • 1,713
9 votes
2 answers
9k views

R leaflet map - Change legends based on selected layer group

I am making an R leaflet map (not Shiny) and I have two control groups, and based on the selection I would like a different legend to become visible. Currently I only manage to have both legends ...
Younes's user avatar
  • 129
4 votes
1 answer
6k views

Add Icons to Layer Control in Leaflet R

how to add icons to the layer control in package Leaflet R?. I made icons with the following code: rojos <- makeAwesomeIcon(icon='ion-waterdrop', library='ion', markerColor = 'red', iconColor = '...
Edgar Mora's user avatar
2 votes
1 answer
3k views

Leaflet: Custom bin legend for raster

I've been playing around with the leaflet package and can't create a proper legend for a raster. The problem is as follows: I've created an informative map with this code: raster file: https://drive....
noriega's user avatar
  • 456
2 votes
1 answer
3k views

Creating legend with custom absolute position in Leaflet within R Shiny

I'm working on a webmap with R, using Leaflet and Shiny. The map has an absolutePanel in the top right corner, and I would like to position the legend so that it's not all the way in the topright ...
BGroza's user avatar
  • 23
0 votes
1 answer
1k views

Leaflet R legend & popup overlap rMarkdown flexdashboard

I am making an rMarkdown flex dashboard interactive html page which we will embed into another page (an iFrame). There are two small maps side by side. The maps themselves, the content, scales, legend ...
sconfluentus's user avatar
  • 4,955
1 vote
1 answer
2k views

How to display WMS legends based on layer groups in Leaflet for R?

I'm trying to display WMS legends based on layer groups in Leaflet and Leaflet extras for R in Shiny. I am using input$map_groups as described here but it doesn't seem to work, any ideas on how to ...
arevaju's user avatar
  • 163
1 vote
1 answer
792 views

image not displaying in html string for addControl() from leaflet in R

I have the following code myicon <- makeIcon( iconUrl = "myicon.ico" ) html_legend <- "<img src='myicon.ico'>hey<br/>" map_leaflet <- leaflet() %>% addTiles() %>% ...
tuttifolies's user avatar
  • 1,427
7 votes
2 answers
10k views

How to hide/toggle legends based on addLayerControl() in Leaflet for R

I'm wondering how to hide/toggle legends based on addLayerControl() in Leaflet for R? When option layer a is toggled, then the data of option layer b is not shown by addPolygons() because I can use ...
Yoorizz's user avatar
  • 217
3 votes
1 answer
4k views

Display natural break intervals in Leaflet legend R

I have tried searching for an answer to this question and came across this : Manually adding legend values in leaflet But this isn't quite what I would like as the leaflet map displays the breaks I ...
MrMonkeyBum's user avatar
13 votes
1 answer
25k views

Manually adding legend values in leaflet

I'm plotting results from various British elections in Leaflet and ran into a bit of a problem with legends. For the various results in the general election I'm using the same colour function with ...
Robert Hickman's user avatar
15 votes
3 answers
12k views

Leaflet Legend for Custom Markers in R

I have an R Shiny app that uses Leaflet to create an interactive map. On this map, a categorical variable is used to designate different kinds of points and is visualized using custom markers (...
Twitch_City's user avatar
  • 1,246
16 votes
1 answer
10k views

Creating legend with circles leaflet R

I'm trying to create a leaflet map with points sized by a variable. Is it possible to create a legend with different sized circles representing the different variable values? I found another post ...
Hugh Sturrock's user avatar
4 votes
1 answer
3k views

R Leaflet Legend: colorBin- removing decimals in between breaks

I am creating an interactive HTML map in R using the Leaflet library. The legend employs the colorBin method for creating the 6 categories to break the data into. Using the min(values) and max(...
sconfluentus's user avatar
  • 4,955

15 30 50 per page