Skip to main content

All Questions

Tagged with
1 vote
1 answer
2k views

Invert Y axis of L:CRS.Simple map on Vue2-Leaflet

I am developing a map application using L.CRS.Simple of Vue2-Leaflet, and I want to invert the y-axis of my map as explained in the Leaflet documentation. I found a similar question here, and it seems ...
Ariana Rubí's user avatar
6 votes
2 answers
2k views

Use lasso instead Rectangle for select reign in Leaflet

I am trying to show a leaflet map using R(I can not use Shiny package). I use a 'DT', 'crosstalk' and 'leaflet' packages to calculate the mean of a column for selected data in map. In the map, it ...
Masoud's user avatar
  • 557
11 votes
1 answer
1k views

How to save a leaflet map with drawn shapes/points on it in Shiny?

This question is a follow-up to the questions How to save a leaflet map in Shiny, and Save leaflet map in Shiny. I add a toolbar to draw shapes/points on the map that is addDrawToolbar in the ...
user avatar
10 votes
1 answer
544 views

Load Quarto html map data from json for Leaflet map generated in R

I have created a Quarto blog post which contains many leaflet maps, generated in R. As the data for each map is embedded within the html file, the file itself is very large. This is causing problems ...
SamR's user avatar
  • 16.6k
7 votes
1 answer
3k views

Display layers at certain zoom levels in R Leaflet

I am working on an interactive map with the R package "leaflet". I would like to change automatically the visible layers depending on the zoom level. For example, I would like to have a polygon ...
Adrien Taccoen's user avatar
6 votes
3 answers
1k views

Does markercluster work together with leafletProxy() and option iconCreateFunction?

Am I doing something wrong, or why does the below example not work? I am trying to make leaflet markercluster plugin work with leafletProxy() in an R Shiny app, using the option iconCreateFunction. Is ...
nilsole's user avatar
  • 1,723
9 votes
1 answer
6k views

Circles in legend for leaflet map with addCircleMarkers in R - without shiny

I am creating a leaflet map in R - I don't need to build a shiny app, and haven't tackled that particular skill set yet! I was trying to follow along with this post here to create circles in my ...
Nova's user avatar
  • 5,706
8 votes
1 answer
2k views

Clicking a leaflet marker takes you to URL

Within the leaflet package for R, is there a way to click on a marker, and be directed to a URL?* Here's the JS solution. In R, to add a Popup with a URL: library(leaflet) content <- paste(sep =...
Rich Pauloo's user avatar
  • 8,172
4 votes
1 answer
2k views

Show layer in leaflet map in Shiny only when zoom level > 8 with LayersControl?

I want to show a layer only when its clicked in the LayersControl and the zoom level is greater than a certain number, e.g. 8. One of the reasons is, that some expensive computations must be performed ...
needRhelp's user avatar
  • 3,108
4 votes
3 answers
6k views

Search button for Leaflet R map?

I'm using the leaflet library in R, which is a wrapper to the leaflet.js library. I'm wondering if it is possible to add a query or search button using the R interface (or some hack to the underlying ...
Devon's user avatar
  • 680
1 vote
2 answers
2k views

Clustered leaflet markers with sum (not count) totals: how to get consistent round red shape and label format like in unclustered markers

I would like to modify the behavior of leaflet grouping feature to total on grouping and preserve a round red bubble shape dependent on value. My data contains columns: lon lat sales_ytd I would ...
Jacek Kotowski's user avatar
11 votes
3 answers
14k views

Change the default position of zoom control in leaflet map of Shiny app

I am using Shiny app to create leaflet map, but want to change the default position of zoom control from topleft to topright. R leaflet package sets the default position as topleft in the source ...
Bangyou's user avatar
  • 9,736
6 votes
3 answers
5k views

Coordinates of current mouse position on leaflet map with shiny

I want to access the current mouse position in a leaflet map in shiny. When using shiny you can get the current coordinates of a click event using input$MAPID_click, which contains latitude and ...
needRhelp's user avatar
  • 3,108
5 votes
1 answer
3k views

R shiny leaflet javascript addons - heatmap

Trying to use one of the javascript addons for leaflet - specifically the heatmap functionality - https://github.com/Leaflet/Leaflet.heat Thing is - I want to incorporate this into Shiny, but leaflet ...
Anon's user avatar
  • 619
4 votes
2 answers
5k views

R leaflet - Show/Hide addControl() element with group layers

I have a leaflet map which uses a custom legend using HTML and added using the addControl function (following: Leaflet Legend for Custom Markers in R). However, I only want the legend to show when ...
Tom Newton's user avatar

15 30 50 per page