Questions tagged [r-leaflet]

This R package makes it easy to integrate and control the open-source JavaScript Leaflet software in R.

499 questions
0
votes
0 answers

Add axis to leaflet map

How can you add an x and y axis to a leaflet map figure -- in the case of a map how to add the longitude and latitude? For the figure below, how can axis be added please? library(leaflet) leaflet() %>% addTiles() %>% addMarkers(lng=174.768,…
user2957945
  • 2,353
  • 2
  • 21
  • 40
0
votes
1 answer

How can I control the zoom speed when selecting a point on a leaflet map (with Shiny) when the user presses the button to zoom in to the point?

I am developing a dashboard in Rmarkdown, Flexdashboard and Shiny. At the moment I am using Leaflet to map several points and I have a shiny input, which when pressing a button selects a certain point and zooms it. I would like to know if there is a…
Wolkuz
  • 83
  • 9
0
votes
0 answers

How to show word cloud on map popup using leaflet in r

I am trying to plot the word cloud of sub-categories of that state in popup window when user clicks on that state in map. ui <- bootstrapPage( leafletOutput("mymap", height = 300) ) server <- function(input, output, session){ output$mymap <-…
0
votes
1 answer

How I can reload my Leaflet map in Shiny R

I'm doing a Shiny App in RStudio. Now, I'm creating a map using Leaflet package. The code works properly, and shows my modeling when I ask, and all is almost ok but for one point: When I try to do another modeling, I click the button to show my new…
0
votes
1 answer

Insert leaflet widget in README.md

I would like to include a map in the README page of an R-Packages repository (vegtable), but I don't know, if it is really possible. For instance one example: --- output: github_document: html_preview:…
Miguel Alvarez
  • 314
  • 2
  • 11
0
votes
3 answers

leaflet-groupedlayercontrol using group layers in R

I am interested in using leaflet-groupedlayercontrol within an Leaflet map created in R and have been following this gist. I can successfully add the JS plugin (as in this working example below), but my question is how do I refer to marker groups…
SEAnalyst
  • 1,077
  • 8
  • 15
0
votes
2 answers

How to access leaflet map passed using input?

In my example I need to access leaflet map from module 2 (nested) and use input$ on a map to return polygon coordinates. It works perfectly when I do this in my main module (module 1) where I can freely refer to 'map'. Unfortunately, when I pass map…
mustafa00
  • 751
  • 1
  • 7
  • 28
0
votes
1 answer

How do I output my leaflet map from R into a Sharepoint site

I created a leaflet map using R, saved as a webpage (html) on a local folder. My organization has a sharepoint site, and I'd like to host the map on a sharepoint site/page, so that people in my organization can interact with it. How would I do that?
0
votes
0 answers

How to Create Senate Roll Call Voting Map in R

I am looking to ultimately render a map in Leaflet that shows the roll call voting results for a specific vote from the Senate. This obviously involves coloring a state polygon based on the unique combination of the Senator's party affiliation and…
Jared
  • 85
  • 2
  • 11
0
votes
0 answers

R shiny map marker click event

I have a shiny leaflet map which draw markers while input$map_marker_click is null, when I click these markers, another dataset which is past route of my previous dataset is used as an input to show different markers. After showing past route, I go…
0
votes
2 answers

How to programmatically click element on DrawToolbar?

For some reason I would like to draw polygon using button but not the one from the Toolbar. In short, I want to click 'Click me!' button and start drawing polygon instead of choosing this option from toolbar. I tried to use jquery to trigger 'click'…
mustafa00
  • 751
  • 1
  • 7
  • 28
0
votes
1 answer

Shiny mapshot to export leaflet into a knitted document

I have a shiny app I'm using to visualize a variety of data. One of the plots produced is a map. I'm allowing the user to download all the plots at once as a single Word doc using a knitted document. I would like to include the map in the document,…
user2602640
  • 640
  • 6
  • 21
0
votes
1 answer

R Shiny: Updating Multiple Dependent Dropdown Menus with Leaflet Map Click

I have an interactive map rendered with leaflet in a shiny dashboard in R. The dashboard also contains two dropdown menus created with selectizeInput, where the options available in the second dropdown depend on the selection in the first dropdown.…
Miguel
  • 416
  • 3
  • 16
0
votes
1 answer

I am having trouble puting markers on a Map in R leafjet

Here is my code: m <- leaflet() %>% addProviderTiles(providers$Stamen.Toner) %>% setView(lng = -107.9917071, lat = 59.5, zoom = 3.5) %>% addPolygons(data = plant, color = "#660000", weight = 1, …
Roman10
  • 115
  • 1
  • 6
0
votes
1 answer

Why not using numeric coordinates instead of sf object=POINT?

I want to show points on the map. Those points are represented as coordinates (long/lat) and are stored in a data frame as numerics. I'm wondering if I really need to transform numeric coordinates (lon/lat) to sf object of POINT type. I don't know…
mustafa00
  • 751
  • 1
  • 7
  • 28