Skip to main content

All Questions

Tagged with
0 votes
1 answer
83 views

Having google search images as leaflet popup

Recently I have been working with the package 'leaflet' in R. I have already created my interactive map and so on, but I would prefer to style it up a bit. My program recieves a list of Cities ...
user23004030's user avatar
0 votes
0 answers
40 views

When i knit my R markdown it doesn't show leaflet after running showing a Wordcloud

Basically when I knit the R markdown the file shows just the Wordcloud, and not the leaflet map. If I invert the order everything works fine. Any suggestion? My chunks here: library(tidytext) library(...
Corvinus's user avatar
-1 votes
1 answer
26 views

Lag in HTML Outputs within R

I found this post on stackoverflow to make an interactive map in R (second answer): Search button for Leaflet R map? library(leaflet) library(inlmisc) df = read.csv(textConnection( 'Name, Lat, Long &...
stats_noob's user avatar
  • 5,689
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
1 vote
1 answer
196 views

Adding "Breaks" in "htmlescape"

I am following this tutorial here (https://rstudio.github.io/leaflet/popups.html): library(htmltools) library(leaflet) df <- read.csv(textConnection( "Name,Lat,Long Samurai Noodle,47....
stats_noob's user avatar
  • 5,689
1 vote
1 answer
27 views

Is "knitr" required for certain outputs in R?

I am trying to follow this post on stackoverflow (R Leaflet: Add a Range Slider to Filter Markers without Shiny). I copy and pasted the code below: library( crosstalk ) library( leaflet ) library( ...
stats_noob's user avatar
  • 5,689
1 vote
1 answer
594 views

Making a leaflet map fullscreen in an RShiny dashboard

I'm working on creating an RShiny dashboard with a leaflet map; I want my map to be fullscreen, but I can't quite seem to get the borders/margins to go away. I have tried the solutions offered in a ...
metamorporpoise's user avatar
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
1 vote
0 answers
126 views

Exporting R-leaflet applications as html with full source code

since updating my R verison, R-leaflet applications exported (e.g via saveWidget(map, "map.html", selfcontained = T) don't show the full source code any more but instead reverence different ...
ClaraH's user avatar
  • 11
0 votes
1 answer
106 views

How to pass a list of urls contained in a dataframe column into a leaflet map?

I want to make a map using leaflet so that the points in the map have popup notes. Each popup will have a clickable link to redirect to an Internet page. The URLs that will be inserted in such popups ...
mad10les's user avatar
  • 152
1 vote
1 answer
592 views

How to make a click on R Leaflet state go to a url?

I'd like to build a map where when a state is clicked, it will open a hyperlink url in a new tab. I've been searching around for answers and can't quite get it to work for r leaflet. I believe I need ...
Tim's user avatar
  • 71
0 votes
2 answers
457 views

RShiny: Trying to centre my leaflet but I want the legend to stay left justified

I've searched around google and stack overflow but haven't found this question asked before. Basically I want to centre my leafletOutput and have done so with this code: UI <-fluidPage( fluidRow(...
cdbezz's user avatar
  • 43
1 vote
1 answer
445 views

HTML code working in r leaflet for popups but not for labels

So I'm working with leaflet in R Studio and I'm trying to include some HTML code into the popups and labels of the icons. I just can't figure out why it's working for the popups but not the labels. ...
cdbezz's user avatar
  • 43
0 votes
1 answer
246 views

R: Using browsable() in leaflet resulting in a smaller screen height

I build a leaflet in R like this: my_leaflet <- my_data %>% leaflet (options = leafletOptions( - ) %>^% addProvidersTiles( - ) setView( - ) %>% addMarkers ( -- ) %>% addCircleMarkers( - ...
Luk7's user avatar
  • 33
0 votes
0 answers
68 views

How do I get includeHTML to work inside multiple TabPanels?

I'm trying to include 2 HTML files in different tabPanel separations for a Shiny app. I do that, and one of the html files renders properly but the other one's widgets just do not display. Anyone know ...
Armin Thomas's user avatar
1 vote
0 answers
215 views

R Leaflet - How to combine text and figure in popup?

I would like to combine text and a figure in a Leaflet Popup. I saw this on a website of Deutsche Bahn: Multi-Object-Popup Website: strecken.info For me it would be sufficient to combine two of these ...
Lars Möller's user avatar
3 votes
1 answer
3k views

Shiny R: How to make a Leaflet legend horizontal

I'm trying to make a horizontal legend in a Shiny app with a Leaflet map. I can change the display to display: flex; using CSS which makes the legend horizontal but what I'm aiming at is something ...
Ziemowit Bućko's user avatar
2 votes
2 answers
1k views

Leaflet maps not appearing in tabbed HTML document output from Rmarkdown

I've used R Markdown to create a HTML document with tabbed sections and each tab should include one Leaflet map. When I run the code, the Leaflet maps only appear in the first two tabs of the HTML ...
RaBe's user avatar
  • 53
0 votes
1 answer
727 views

Creating label in leaflet map using htmltools produces tiny label

Creating a leaflet map. First step, specify the label. The code used on leaflet github puts %>% lapply(htmltool::HTML) after the sprintf() function. However, making it is creating the label as ...
Mason's user avatar
  • 3
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
0 votes
1 answer
2k views

Saving a leaflet map as an html file

I've created a leaflet map of corn yield in Kansas using USDA NASS data. The problem I'm running into is exporting the leaflet into an html file using the command: htmlwidgets::saveWidget(...
gm007's user avatar
  • 557
1 vote
2 answers
3k views

Post local image into a popup using leaflet and R

I've been trying like crazy to add local images (as in image files in my computer) into my leaflet map using R. I have plotted around 500 coordinates analyzing some images and I wish to show that ...
Bernardo's user avatar
  • 498
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
0 votes
1 answer
2k views

Saving R leaflet-shiny interactive map as HTML executable file

Is there a way to save a leaflet-shiny script as a single executable HTML file? For example for a leaflet script you can use: saveWidget(map, file = "mymap.html") Then the html file will contain all ...
user avatar
1 vote
0 answers
359 views

R Leaflet HTML Formatting

Using Labels along with addCircleMarkers I want to customize the format of labels displayed. This is achieved with HTML as follows. labels <- sprintf( "<div style = 'width: 170px; word-wrap: ...
Sada93's user avatar
  • 2,835
3 votes
1 answer
4k views

labels in leaflet r with HTML tags

All good souls, help needed. I am creating a leaflet map and cannot resolve a strange issue with labels. I created labels with few variables and the labels render ok if the first variable is numeric, ...
Slav's user avatar
  • 479
0 votes
1 answer
429 views

r - Overlay fileInput on leaflet in shiny

I have a leaflet map in a shiny app. It takes a file from a user and plots that data. It's kind of ugly right now, though. I'd really like to have the fileInput to be overlaid on the leaflet map. In ...
Heliornis's user avatar
  • 391
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
2 votes
1 answer
2k views

Image in Leaflet marker popup in Shiny

When making maps in R using Leaflet I often use images in the marker popups by putting an html line. I would like to make a leaflet map in Shiny that allows the user to select photos to go into the ...
LAD's user avatar
  • 151
2 votes
3 answers
2k views

Overlay Static Images on R Leaflet htmlwidget

It it possible to overlay an image to R leaflet maps - or perhaps in the leaflet html - that would stay fixed overtop the map itself? That is, the image wouldn't be rendered on the map itself, but ...
HGupta's user avatar
  • 127

15 30 50 per page