All Questions
51
questions
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 ...
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....
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(...
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/...
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:
...
-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
&...
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)
...
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( ...
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 ...
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(...
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 ...
8
votes
4
answers
4k
views
embed R leaflet map in wordpress
I have just created a simple interactive map using leaflet package in R. Something like this
leaflet() %>% addTiles()
Now I would like to embed it in my wordpress website.
I clicked on the ...
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 ...
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 ...
26
votes
4
answers
15k
views
Adjust size of leaflet map in rmarkdown html
I'd like to change the height and width of leaflet map outputs in html document. Is there a simple way to do this in R markdown without getting into whole CSS business?
```{r}
library(leaflet)
...