Skip to main content

Questions tagged [r-leaflet]

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

1 vote
1 answer
73 views

How to visualize single points in shiny app mapview leaflet

I have a large dataset but I am providing 3 records to make this example reproducible with the minimum amount of data. I am able to show on leaflet all the 3 sites at once but I would like to show one ...
Salvador's user avatar
  • 1,467
0 votes
0 answers
23 views

R Leaflet - Problem Highlighting Features Underneath Layer

I am encountering a problem where I can't see highlighted features underneath a transparent top layer. I have a simple map setup, where I have a US county choropleth layer with a transparent US state ...
outsidethebox93's user avatar
0 votes
2 answers
64 views

Read NativeLand JSON and plot in ggplot

I would like to add my own features to the map of Native Land: > library(leaflet) > library(sf) > url = "https://native-land.ca/coordinates/indigenousTerritories.json" ...
J Lal's user avatar
  • 49
0 votes
0 answers
46 views

How to use markers to call out points on an image?

I am currently working on a simple shiny app in R that is supposed to display an image of a fantasy map. That in itself is pretty simple, but I'd like to be able to place markers on the image, that ...
zepljak's user avatar
0 votes
1 answer
58 views

Issue with Capturing Drawn Polygons in Shiny App Using leaflet.extras

I'm working on a Shiny application where users can draw polygons on a Leaflet map, and I'm encountering an issue where the drawn polygons are not being captured or saved as expected. I'm using the ...
cea's user avatar
  • 5
0 votes
1 answer
104 views

Make smooth contours in when using leaflet and tmaps in R

I am using the script below to make to make interactive leaflet map. However, the contours have sharp changes and are not smooth and round. How can I edit this code to achieve that? The data and code ...
vp_050's user avatar
  • 508
1 vote
1 answer
83 views

Is there a way to pop out a leaflet map in an R Shiny app into a new browser tab?

I'm making an R Shiny application that includes a leafletOutput map that maps certain datapoints from a filtered dataframe. Is there any way to expand that map to a full screen size in a new browser ...
jjjjohnson's user avatar
0 votes
0 answers
33 views

Lines for a gpkg not being added to a map in leaflet in R, but lines plot fine in ggplot

I'm trying to plot lines from a gpkg using leaflet, but many of the lines are missing. I don't think it is a problem with the gpkg of sf, because all the lines plot fine when using ggplot. Here is ...
Arik Tashie's user avatar
1 vote
1 answer
92 views

clusterOptions() displaying correct area of map but no markers or clusters

I am working on a Shiny app in R that creates a leaflet map and plots points. Plotting the points by themselves works fine. The issue arises when I try to implement even the most basic clusters. I can ...
z3r0summ's user avatar
1 vote
0 answers
64 views

Add time slider for a stack of rasters

I'm looking for a static HTML solution (no Shiny) to incorporate a timeslider for raster data in a leaflet. leaflet.extras2::addTimeslider() requires the data argument to be "a Simple Feature ...
Rich Pauloo's user avatar
  • 8,172
0 votes
0 answers
54 views

How to offset addStaticLabels using mapview or leaflet

How can the labels be moved up, down or to the sides. direction and offset seems to be ignored. I would like my labels to be moved to the bottom. library(mapview);library(leafem) mapview(franconia) %&...
Salvador's user avatar
  • 1,467
1 vote
1 answer
82 views

Script does not run in Rstudio but runs well line by line

I tried the most basic code for leaflet in rstudio: library(leaflet) m <- leaflet() m <- addTiles(m) m <- addMarkers(m, lng=174.768, lat=-36.852, popup="The birthplace of R") m ...
Sergei Shekhovtsov's user avatar
0 votes
1 answer
92 views

How to color a leaflet map by a categorical variable?

Using leaflet, how can I color the different areas based on 'NAME_ASCI' and show colors on a legend? This works: library(leaflet) library(mapview) m <- leaflet(franconia) %>% addProviderTiles(&...
Salvador's user avatar
  • 1,467
0 votes
0 answers
53 views

Issue with R Shiny dashboard with Leaflet.extras2 > addWMS not working

I am attempting to create a shiny dashboard with an embedded leaflet map. I want the user to be able to select a city from a dropdown where the leaflet map then automatically zooms to that city based ...
Mat W's user avatar
  • 35
0 votes
1 answer
102 views

LabelOnlyMarkers in R Leaflet with specific colors

I want to build a leaflet map with CircleMarkers and LabelOnlyMarkers atop the circles. Labels and circles should have colors specified in a data.frame column. The following does what I want, except ...
symbolrush's user avatar
  • 7,355

15 30 50 per page
1
3 4
5
6 7
47