Skip to main content

All Questions

Tagged with
72 votes
8 answers
27k views

How to get Leaflet for R use 100% of Shiny dashboard height

I am in the process of creating a Shiny dashboard application, where the dashboard body is supposed to show some maps. So far no problem to get the map expand over the entire width of the body, but it'...
TomGeo's user avatar
  • 1,315
19 votes
1 answer
11k views

How to get the zoom level from the leaflet map in R/shiny?

I create a map using leaflet package in Shiny which have a selectInput to allow user to select from a site list. The site list also adds into leaflet as markers. When user selects a new site, I want ...
Bangyou's user avatar
  • 9,736
18 votes
2 answers
9k views

How to display (advanced) customed popups for leaflet in Shiny?

I am using R shiny to build web applications, and some of them are leveraging the great leaflet features. I would like to create a customed and advanced popup, but I do not know how to proceed. You ...
cho7tom's user avatar
  • 1,060
17 votes
1 answer
14k views

shiny leaflet ploygon click event

I have a map called business which is downloaded from natural earth website. What I am doing here is I created a basic Map output which shows the map. I am mainly using two columns which are admin(...
user3833612's user avatar
16 votes
1 answer
10k views

Creating legend with circles leaflet R

I'm trying to create a leaflet map with points sized by a variable. Is it possible to create a legend with different sized circles representing the different variable values? I found another post ...
Hugh Sturrock's user avatar
16 votes
2 answers
10k views

Multiple markers on same coordinate

When plotting out markers on a interactive worlmap from the r package leaflet data with exactly the same coordinates will overlap each other. See the example below: library(leaflet) Data <- ...
Berecht's user avatar
  • 1,115
16 votes
1 answer
8k views

Changing Leaflet map according to input without redrawing

I'm wondering how I can change Shiny and Leaflet to plot points according to the change in input without redrawing the whole map. The code i'm using is: library(leaflet) library(shiny) library(dplyr) ...
Arvind Suryanarayana's user avatar
16 votes
1 answer
7k views

Save leaflet map in Shiny

I have created a leaflet map in a Shiny application. Now I need a download button, so that the user can download the currently shown map including all markers, polygons etc. as a pdf file. I have ...
needRhelp's user avatar
  • 3,108
15 votes
1 answer
6k views

Click event on Leaflet tile map in Shiny

Is it possible to get the lat long from a click event in leaflet/shiny (in R) from the tile map? (i.e. NOT from any loaded markers, polygons etc). Just to show positional (lat/long) info i guess. I ...
Sam's user avatar
  • 1,430
12 votes
1 answer
6k views

Shiny - how to highlight an object on a leaflet map when selecting a record in a datatable?

Is there a way to highlight a marker or polyline on a leaflet map when selecting (clicking on) the corresponding record in a datatable? I looked at these questions/threads: selecting a marker on ...
M_M's user avatar
  • 909
12 votes
2 answers
2k views

Cache or pre render leaflet map in shiny app

I am trying to map ~8000 polygons using leaflet and run into performance issues. As I am using the map within a shiny app, I was wondering if its possible to somehow cache or pre-render the map. Note ...
David's user avatar
  • 9,846
12 votes
1 answer
5k views

How to add a text on a leaflet map?

Each day I need to draw a path on a map and add a text like 4, 5 or 8 min. indicating how long it takes by car from the starting point to the destination (see the figure below). I thought it would be ...
user avatar
11 votes
3 answers
14k views

Change the default position of zoom control in leaflet map of Shiny app

I am using Shiny app to create leaflet map, but want to change the default position of zoom control from topleft to topright. R leaflet package sets the default position as topleft in the source ...
Bangyou's user avatar
  • 9,736
11 votes
1 answer
10k views

Leaflet for R: How to customize the coloring of clusters?

How do I customize the coloring of the addMarkers function in the leaflet package for R? The default coloring for clusters is: 1-10 Green 11-100 Yellow 100+ Red I'd like to change the ranges and ...
Tim_K's user avatar
  • 679
11 votes
1 answer
1k views

How to save a leaflet map with drawn shapes/points on it in Shiny?

This question is a follow-up to the questions How to save a leaflet map in Shiny, and Save leaflet map in Shiny. I add a toolbar to draw shapes/points on the map that is addDrawToolbar in the ...
user avatar

15 30 50 per page
1
2 3 4 5
56