Skip to main content

All Questions

Tagged with
0 votes
0 answers
50 views

Why are my leaflet points stuck to the map edge?

I try to plot transit stops on a leaflet map, indicating local clustering ("LISA"), based on Moran's I. The map is embedded in an R markdown file. I've successfully done that with polygon ...
0 votes
1 answer
53 views

Connecting R Leaflet to esri vector tile service

I'm building a Shiny leaflet application that I want to use a ESRI vector tile map from my organization for. I can see that leaflet connects to it as the attribution is accurate. However the tiles ...
6 votes
3 answers
5k views

Coordinates of current mouse position on leaflet map with shiny

I want to access the current mouse position in a leaflet map in shiny. When using shiny you can get the current coordinates of a click event using input$MAPID_click, which contains latitude and ...
10 votes
1 answer
528 views

Load Quarto html map data from json for Leaflet map generated in R

I have created a Quarto blog post which contains many leaflet maps, generated in R. As the data for each map is embedded within the html file, the file itself is very large. This is causing problems ...
0 votes
0 answers
37 views

Interactive R maps that work well on mobile, with inset AK and HI?

Issue: I need an interactive choropleth map of the US that will work well on mobile (ideally pinch-zoom), has a pop-up on tap/click, and has AK and HI set below. Plotly isn't it as you have to tap the ...
0 votes
1 answer
108 views

leaflet search don't make a search

I'm want make a map for compare 2 coordinates for the same point. Are 1500 different points. DFINAL<- structure(list(ACCENUMB = c("G 2771", "G 2771A", "G 6386", "...
6 votes
1 answer
552 views

Customize highlight between between plotly figure and leaflet map

My goal is to link highlighting between a plotly figure in one panel and a map in the second panel. For my purposes, I want to select (highlight) data in one panel and have the selected data highlight ...
1 vote
2 answers
2k views

Generate random colors for leaflet map

Great R Gurus, I am struggling to find a way to randomly mix discrete colors for my leaflet map for a large number of observations. The problem is the following command put similar colors next to ...
3 votes
1 answer
514 views

R Shiny leaflet stop zoom on scroll and use ctrl + scroll to zoom the map & move map with two fingers on mobile?

I am creating 100 + leaflet maps in my shiny app. The maps are 100% of the width of the page, so when the user goes to scroll down the page it zooms the map but I would like it to continue scrolling ...
1 vote
3 answers
2k views

R leaflet package produces blank (grey) map [Ubuntu 14.04]

I tried out the examplecode from the leaflet package doc: devtools::install_github("rstudio/leaflet");library(leaflet) m <- leaflet() %>% addTiles() %>% # Add default OpenStreetMap map ...
53 votes
2 answers
47k views

How to save Leaflet in R map as png or jpg file?

I'm using Leaflet package to create maps in R. It works perfectly. I can export maps in R with simply Export, but I need to export maps from script in R. My simple code is: png("test_png.png") (m <...
0 votes
1 answer
56 views

Leaflet does not work with a specific basemap layer in R

I am recently working on a project. Its one dimension is to make a leaflet map with different basemap layers. Here is the code so far; library(leaflet) library(leaflet.providers) leaflet() %>% ...
1 vote
2 answers
1k views

Cannot display mapview output after installing R 4.0.0

After I installed the R 4.0.0, I cannot display the mapview output in the viewer of RStudio. It would be great if someone can give me some hints to solve this. Here is an example code. library(...
2 votes
0 answers
214 views

modify icon size using iconCreateFunction in leaflet for R

Using the quakes data as an example and the code below, I wish to modify the icon size. I need to keep the rest of the code as unchanged as possible, I just want to make the icons smaller. Can anyone ...
2 votes
0 answers
498 views

Time series chloropleth in R Shiny / Leaflet

How do you animate a choropleth in RShiny over time using leaflet? I would like to animate the color of choropleths over time in Shiny according to their numeric value. Below is what I have tried, but ...

15 30 50 per page
1
2 3 4 5
131