Skip to main content

All Questions

Tagged with
0 votes
0 answers
27 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
88 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
0 votes
0 answers
56 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,154
0 votes
1 answer
219 views

Scrape leaflet map coordinates from a dynamic website

I am trying to scrape the marker coordinates from a website containing a leaflet map (osm data). I have been trawling the web for answers and it appears that a simple query to the parsed html will not ...
M.Teich's user avatar
  • 607
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
78 views

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

sorry for a beginners' question. 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="...
Sergei Shekhovtsov's user avatar
0 votes
1 answer
87 views

How to color a leaflet map by a categorical variable?

Using leafleat, 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
174 views

How to add labels to mapview

This may be an easy question but for some reason can't figure out how to add labels to each region or polygon in my real map. How can I add the NAME_ASCI names to this map? library(mapview) library(...
Salvador's user avatar
  • 1,467
0 votes
1 answer
94 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
1 vote
1 answer
180 views

Custom legend order in R leaflet

I created a leaflet map and now need to customize the order of the legend. By default leaflet alphabetizes the legend order. In the example below, I need the legend order to be (from top to bottom): ...
tassones's user avatar
  • 1,474
0 votes
1 answer
59 views

Change leaflet marker fill color by group

In the example below, I have cities located on a leaflet map. I would like the fill color to be yellow for cities in Virginia and green for cities in North Carolina. How can I set the fill colors of ...
tassones's user avatar
  • 1,474
0 votes
0 answers
48 views

Is there any way to expand polygon objects, just to make them touch each other graphically?

I created these shape objects through K-Means clustering but I want them to have touching borders without doing anything too manual. Any assistance would be great. Working with crime data and it doesn'...
CB24's user avatar
  • 1
0 votes
1 answer
54 views

Leaflet proxy in r only shows latest added Layer

I want to visualise the development of fatal traffic accidents and accidents with severe injuries on state and community level in a leaflet map. As a solution i use a shiny app with a radio button for ...
Thomas231's user avatar
0 votes
1 answer
60 views

Can leaflet layer controls be used to alter popup contents in a Shiny dashboard?

I am building a dashboard in R Shiny that includes a map rendered using R leaflet. There are popups associated with locations on the map and items in the popup are also used as layer controls. i.e., ...
user3900349's user avatar
0 votes
1 answer
78 views

How to set an anchor and create polygons from shapefile

I am following up on the example here: How to make small polygons from shapefile and extract coordinates I am trying to adapt that example to a different shapefile but I am getting errors. The new ...
Salvador's user avatar
  • 1,467

15 30 50 per page