Questions tagged [r-leaflet]

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

499 questions
0
votes
1 answer

r-leaflet addAwesomeMarkers() not showing up when using markerCLusters

I have a leaflet map that shows AwesomeMarkers appropriately, but when I add clusterOptions = markerClusterOptions to the arguments, none of the markers are displayed. I'm following the examples here: https://rstudio.github.io/leaflet/markers.html…
jzadra
  • 4,012
  • 2
  • 26
  • 46
0
votes
1 answer

R R-Leaflet addAwesomeMarkers. How to set conditional colours based on column values (character)

Using leaflet and addAwesomeMarkers, I want to vary the color of the map marker according to the value of a specific column. Using the quakes data, i can vary color according to a mutated column if the contents of that column is…
r0bt
  • 383
  • 3
  • 12
0
votes
0 answers

I have a shiny app i want to use the click event to change selection value

I'm having a problem since I started learning shiny and R, so please be patient. I'm working on a shiny map where whenever a user clicks on a polygon, it changes the first selection to the same area that the user picked on the map. This is my…
HIXER
  • 11
  • 2
0
votes
3 answers

Combine coordinates with same custom key in R

I web-scrapped multiple store locators, and now I want to find all the brands that each store has. As every brand has slightly different coordinates, I combined the data by creating a custom key (rounding lat and long to 4 decimals and adding the…
Xavier
  • 129
  • 7
0
votes
0 answers

Library eror deploying shiny app on shinyapps.io

I've finished a shiny app with leaflet on R but I can't deploy it. It works well on my computer and my virtual machine but not on https://www.shinyapps.io. Actually it's just an interactive map The error message is : shinyapps[XXXXXXXX]: Warning:…
mamoche
  • 1
  • 1
0
votes
1 answer

How to use location marking in leaflet package in R

I have added two markers on leaflet map, and I want to link those markers (like travelling from one location to the other). How can I do that? The code that I used to create markers is provided below: p <- leaflet() p <- p %>% addTiles() p <- p…
0
votes
1 answer

Shinyapp Leaflet map doesn't display markers correctly in Chrome

I made an RShiny app with a leaflet map that has markers. The marker icons work just fine in Safari and Firefox, but in Chrome they do not render and instead a different icon is displayed. The app is the Interactive GSSP App. It is being hosted on…
lotkey
  • 48
  • 4
0
votes
1 answer

R sf point Popups inaccessible after adding polygon via simplevis

I am trying to create an interactive map (using the simplevis and leaflet packages) to be used in an RMarkdown HTML presentation. The popups work fine when no polygon is added but as soon as the polygon is added the popups can no longer be…
Ed_Gravy
  • 1,841
  • 2
  • 11
  • 34
0
votes
1 answer

Layering maps in leaflet

Let's say I make the following map in leaflet in R using dput(states) structure(list(Nestbox = c("C1", "C1", "C1", "C1", "C1", "C1", "C1", "C1", "C10", "C10", "C10", "C10", "C10", "C10", "C10", "C10", "C101", "C101", "C101", "C101", "C101",…
McMahok
  • 348
  • 2
  • 13
0
votes
1 answer

Create dynamic number of leaflet layergroups from geojson data

intro I am pretty agile in R, but my java skills are non-existent. Therefor I'm throwing myself at your mercy to answer this, hopefully not too complex, question (or I will have a hard time figuring out the answers ;-)). Running the code below…
Wimpel
  • 26,031
  • 1
  • 20
  • 37
0
votes
1 answer

How to create a weighted heatmap using R Leaflet?

I am attempting to create a heatmap using a data set that has only one value per coordinate, with that value being a continuous variable. All of the examples I have found using leaflet.extras::addHeatmap() use data that can have multiple values per…
jzadra
  • 4,012
  • 2
  • 26
  • 46
0
votes
0 answers

How to reduce the file size of leaflet maps?

I am wondering if there are any methods to reduce the size of leaflet maps. Generating a bare-bones map of the U.S. with only the county polygons produces a 23 MB map. And when I add my data and states, I end up with one that is 30-40 MB. For…
jzadra
  • 4,012
  • 2
  • 26
  • 46
0
votes
1 answer

Leaflet create separate layer groups

I am creating a leaflet map with two different types of layers: A layer for total rental households, and a layer for total borrowing households. This layer should be mutually exclusive: i.e., you should only be able to select one of these layers at…
0
votes
1 answer

How to change a MapView's main data

I'm trying to use observeEvent() to change the Mapview's x argument to new data. I'd normally just use clearShapes() then addPolygons(), but need the zcol etc. arguments. I'd like to do something similar to the following: server <- function(input,…
Warpspace
  • 3,215
  • 3
  • 21
  • 24
0
votes
0 answers

R leaflet: how to change initial zoom based on device (desktop vs mobile)?

I have a map that has a specific view and zoom specified that is good for desktop, however if the user is on a phone I need to adjust the zoom so that the continental U.S. is all viewable on the smaller device. I'm using an RMD to build this in…
jzadra
  • 4,012
  • 2
  • 26
  • 46