Skip to main content

All Questions

Tagged with
10 votes
1 answer
2k views

Show Different Legend When Changing Layer - leaflet

I'm trying to make my leaflet map show no legend when both layers are selected, and when only one layer is selected show that layer's legend. I found these solutions using Javascript: How to switch ...
0 votes
1 answer
41 views

Can't add WMS layer to R Leaflet

I want to make a leaflet map in R with this wms servic : https://data.geopf.fr/wms-r/wms?VERSION=1.3.0 It works well in QGIS but not with addWMSTiles. library(leaflet) layer="ADMINEXPRESS-COG-...
2 votes
1 answer
1k views

How to show path and distance on map with leaflet, shiny apps?

I would like to show the distance between two locations using the leaflet package in a shiny app. I don't know how to do it. A line should connect two points on a map and display the distance on it. ...
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 (...
1 vote
1 answer
3k views

Delete Polygon from Leafletmap R/Shiny

I draw a Polygon on a leafletmap which I use in a shiny app. Everytime an event is fired I want to delete the old polygon and draw the new one over it. That does not work - I assume I use layerId ...
0 votes
0 answers
23 views

R Leaflet - Problem Highlighting Features Underneath Layer

I am encountering a problem where I can't see highlighted features underneath a transparent top layer. I have a simple map setup, where I have a US county choropleth layer with a transparent US state ...
1 vote
1 answer
83 views

Is there a way to pop out a leaflet map in an R Shiny app into a new browser tab?

I'm making an R Shiny application that includes a leafletOutput map that maps certain datapoints from a filtered dataframe. Is there any way to expand that map to a full screen size in a new browser ...
1 vote
1 answer
886 views

Problems scaling map. Shiny + leaflet

I can't have "full screen" map in my shiny app, because when I used "100%" parameter, the map disappears... ui <- fluidPage( leafletOutput("mymap", height = "...
3 votes
1 answer
3k views

Vary label color in R Leaflet

I have a data frame with a binary variable and xy coordinates. I can map the data with Leaflet and vary the color of the markers for each variable, but I want to know if I can also vary the label ...
1 vote
1 answer
92 views

clusterOptions() displaying correct area of map but no markers or clusters

I am working on a Shiny app in R that creates a leaflet map and plots points. Plotting the points by themselves works fine. The issue arises when I try to implement even the most basic clusters. I can ...
1 vote
0 answers
64 views

Add time slider for a stack of rasters

I'm looking for a static HTML solution (no Shiny) to incorporate a timeslider for raster data in a leaflet. leaflet.extras2::addTimeslider() requires the data argument to be "a Simple Feature ...
0 votes
1 answer
233 views

Scrape leaflet map coordinates from a dynamic website

I am trying to scrape the marker coordinates from a website containing a leaflet map (osm data). I have been trawling the web for answers and it appears that a simple query to the parsed html will not ...
15 votes
1 answer
6k views

Click event on Leaflet tile map in Shiny

Is it possible to get the lat long from a click event in leaflet/shiny (in R) from the tile map? (i.e. NOT from any loaded markers, polygons etc). Just to show positional (lat/long) info i guess. I ...
0 votes
0 answers
54 views

How to offset addStaticLabels using mapview or leaflet

How can the labels be moved up, down or to the sides. direction and offset seems to be ignored. I would like my labels to be moved to the bottom. library(mapview);library(leafem) mapview(franconia) %&...
0 votes
1 answer
102 views

LabelOnlyMarkers in R Leaflet with specific colors

I want to build a leaflet map with CircleMarkers and LabelOnlyMarkers atop the circles. Labels and circles should have colors specified in a data.frame column. The following does what I want, except ...

15 30 50 per page