Questions tagged [r-mapview]

An R package that provides methods for interactive plotting of spatial objects from the sf, sp and raster packages.

85 questions
3
votes
1 answer

mapview error in knitr R markdown document

I've been playing around with the mapview package which has recently been loaded onto CRAN. I've been playing with the demo code and trying to embed it into a knitr markdown document. Unfortunately, I get an error message when I do this and I'm…
Tumbledown
  • 1,887
  • 5
  • 21
  • 33
2
votes
1 answer

Raster output from rasterized sf points does not align with points

I am trying to rasterize some points and am getting a mismatch between the points and the rasters despite the crs being the same. If I convert the raster to polygons it lines up perfectly with the sf points data, but I can't figure out why the…
Blaiso
  • 165
  • 9
2
votes
1 answer

r-mapview legend name in multiple lines

I am trying to create a legend with multiple lines as shown in this leaflet example, but using the mapview package instead. Following the above example, these cases work fine: library(leaflet) library(raster) library(mapview) p…
waiguoren
  • 73
  • 7
2
votes
1 answer

Mapview Popup Graph Appear on Hover?

Is there a way to make popup graphs appear on hover (rather than click) in Mapview? Alternatively, is it possible for the graphs to appear open by default? Rather than produce my own reproducible example, I would defer to the example given with the…
Annie C
  • 57
  • 5
2
votes
0 answers

Getting Error: 'couldnt normalize path' when rendering mapview using leaflet package in R Shiny

I have build a Shiny App with one tab containing a map with points that can be analyzed in other tabs. I build this map using leaflet, but since my version of the map does exactly the same as the mapview package, i want to incorporate this in the…
Stevestingray
  • 399
  • 2
  • 12
2
votes
1 answer

Mapview Points Not Showing in R

When I try to load points in Mapview, the base map will appear centered on the right location but the points do not appear. Below is an image of what it looks like when I attempt to view the pre-loaded Breweries data set. Any ideas are greatly…
Annie C
  • 57
  • 5
2
votes
0 answers

R mapshot cannot create self-contained html

When I try to produce a self-contained html mapshot from the mapview package, it saves a separate folder with files, nevertheless. Also, it produces an error 99 which I could not get solved (but it still produces a working html). Here a reproducible…
Samuel
  • 431
  • 3
  • 10
2
votes
1 answer

mapview doesn't show multipolygons of a query from osmdata

I am using the osmdata package to bring the universities of Bogota, some of these are mapped as multipolygons. However the plot comes out empty. Any idea how to fix it? library(osmdata) library(mapview) query <- opq(bbox = "Bogota") %>%…
Rafael Díaz
  • 2,134
  • 2
  • 16
  • 32
2
votes
1 answer

R code to save shiny.tag.list to html as the viewer->export->save as web page button does

I have a leaflet map that I have modified to have a special CSS for popups following the suggestions here. Now I want to save the result as an HTML web page. The resulting object is of type shiny.tag.list, which I can view with the viewer and export…
user3004015
  • 617
  • 1
  • 7
  • 14
2
votes
0 answers

R Shiny mapview: only redraw layer, not entire map (i.e. leafletProxy)

I am trying to mimic or figure out how a similar function as leafletProxy works in mapview package inside a Shiny app (flexdashboard). The idea is that I have a parameterized database query that fetches a sf dataset (~4200 polygons) based on user…
DarwinsBeard
  • 527
  • 4
  • 16
2
votes
4 answers

filtering data reactively to generate maps

In working with a map in shiny using mapview, I've been flummoxed by reactives and trying to make my map dynamically update. Here is a reproducible example that doesn't work properly, despite being designed using principles from other SO…
jebyrnes
  • 9,082
  • 5
  • 30
  • 33
2
votes
0 answers

lock aggregating/zoom from leaflet heatmap

I would like to stop the splitting of the heatmap when zooming in. In the example below, whenever you zoom in, the heatmap is reconstructed, re-aggregating the points into new, thinner, heat zones. However, I want to lock the "heat zone" at a…
Felipe Alvarenga
  • 2,572
  • 1
  • 17
  • 36
2
votes
0 answers

Plot categorical raster with `mapview` - how to adjust the legend labels?

I would appreciate help with finding a solution to display the custom legend labels of a categorical raster when plotting with mapview. Below is a reproducible example - I wish to have the same legend labels as in the plot made with…
Valentin_Ștefan
  • 6,130
  • 2
  • 45
  • 68
1
vote
1 answer

R: saving a leaflet with white background

I am currently working on a ShinyApp, which includes maps built using sf objects and leaflet. I found the solution to change the initial grey background of the map to a white background (by adding css style), and to save the map as png (by using…
1
vote
1 answer

mapview: transparent na.color when displaying raster files

When I plot aerial photographs in mapview a black rectangle is displayed around the picture, which I believe contains NA values and which I would like to remove. Due to the lack of easily available example data I have uploaded my actual geotif here…
M.Teich
  • 575
  • 5
  • 22