All Questions
51
questions
1
vote
0
answers
277
views
R leaflet display the polygon label by default
I am new to the leaflet package.
I am trying to draw two types of polygons and let the user select them and see the borders. These polygons have labels and I want to display them by default. At the ...
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....
3
votes
1
answer
1k
views
How do I output leaflet map from R into format where I can edit using Leaflet commands?
I have some experience with using R for data manipulation and making maps with GIS software, so I just tried to make my first Leaflet map using the Leaflet for R package. Working off of tutorials I've ...
2
votes
1
answer
2k
views
Leaflet map won't render in browser
I have a map using Leaflet which works in the html output of r markdown, but the map won't render when I open the html in Google or IE. Ggmap works fine, but I'd prefer an interactive map. Any ideas?
...
1
vote
1
answer
1k
views
R: Make interactive maps that can be exported to HTML
I have been working with Leaflet for creating cool interactive maps in R. However, I cannot export the maps, as the background map ends up being grey after export.
library(leaflet)
library(...
2
votes
2
answers
2k
views
R leaflet - cannot export map
I plot a route on a map using R and leaflet :
ct <- read.csv("fl1.csv", stringsAsFactors=FALSE)
m <- leaflet(ct, incl.data=TRUE) %>% addTiles()
m %>% addPolylines(~longitude, ~latitude, ...
0
votes
0
answers
231
views
Make a local R leaflet html map connect to a dynamic online dataset
I'm working on a leaflet map in R. The coordinates presenting in this map is saved in a google sheet and I'm using read.csv to import the data into R.
Here is my sample code below:
geolocation <- ...
1
vote
1
answer
2k
views
Put Leaflet controls outside of map div in Shiny environment
Is it possible to move Leaflet controls outside of the map div in a Shiny environment?
Example:
From the following code:
library(shiny)
library(leaflet)
shinyApp(
ui <- fluidPage(
...
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:
...
3
votes
2
answers
3k
views
Shiny - Control Widgets Inside Leaflet Map
I have a simple shiny-app with just a dropdown listing districts of Afghanistan and a leaflet map of the same.
The shape file can be accessed at this link - using AFG_adm2.shp from http://www.gadm....
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
315
views
Why do Leaflet and DT widgets show blank screen if they are saved as HTML in R?
I'm on a Linux environment, and I'd like to make standalone HTML widgets in R using Leaflet and DT, and generating the HTML with htmlwidgets plugin. The problem is that when I try to open these ...
1
vote
1
answer
792
views
image not displaying in html string for addControl() from leaflet in R
I have the following code
myicon <- makeIcon( iconUrl = "myicon.ico" )
html_legend <- "<img src='myicon.ico'>hey<br/>"
map_leaflet <- leaflet() %>%
addTiles() %>%
...
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 ...
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:
...