Skip to main content

All Questions

Tagged with
49 votes
6 answers
41k views

Saving leaflet output as html

I am using RStudio to create some some leaflet images. I would like to be able to save the output as an HTML so that it can be emailed and others can view it. Below is some sample R code which was ...
h.l.m's user avatar
  • 13.3k
6 votes
1 answer
15k views

Customizing leaflet popup in R

I am using RStudio to create a choropleth leaflet map. I have Country and Url as an attribute in the shapefile that I imported to R. I wish to show the Country name and URL as a hyperlink within the ...
Viv's user avatar
  • 185
7 votes
1 answer
2k views

Center leaflet in a rmarkdown document

I want to create an html document with a centered leaflet widget inside it. --- title: "Exemple" author: "Antoine Bichat" date: "31/08/2018" output: html_document --- ```{r leaflet, fig.align="...
abichat's user avatar
  • 2,406
5 votes
1 answer
444 views

Import data from a leaflet map as an sf object in R

I want to import data as an sf object in R from a leaflet map. The map is this site: https://erickgn.github.io/mapafc/ I also have the HTML from the map as following:https://raw.githubusercontent.com/...
Maria Mittelbach's user avatar
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
4 votes
1 answer
824 views

Customizing Leaflet Map Icons in R

I started to learn how to use the search features in leaflet maps - below is a leaflet map which allows you to search for a city (i.e. single search term): library(leaflet) library(leaflet.extras) ...
stats_noob's user avatar
  • 5,689
3 votes
3 answers
3k views

Placing leaflet controls side-by-side instead of vertically stacked in R/Shiny with HTML/CSS

What I want to do is pretty simple: I want my leaflet controls to be aligned side-by-side in rows rather than vertically as columns (as leaflet automatically does). Here is some short example code: ...
Lauren's user avatar
  • 1,075
3 votes
1 answer
1k views

Is there a way to make leaflet map popup responsive on R?

I use this R code (data was changed) to create an html file that I keep on a server: library(leaflet) leaflet() %>% addProviderTiles(providers$OpenStreetMap) %>% setView(lng=2....
E. Taro's user avatar
  • 41
2 votes
1 answer
1k views

leaflet marker not displaying in certain contexts

I am using the leaflet htmlwidget implementation to draw a web-based map using R. I was looking for a specific marker, couldn't find it, and realized it wasn't being displayed at all. However, when I ...
peopletrees's user avatar
1 vote
1 answer
2k views

R, leaflet package, Passing a character vector of HTML tags to popups?

I'm trying to emulate the first example on https://rstudio.github.io/leaflet/popups.html but with a vector of html tags rather than one. Example on https://rstudio.github.io/leaflet/popups.html: ...
Greenisagoodcolor's user avatar