All Questions
23
questions
0
votes
0
answers
112
views
R Mapview and Leaflet render in quarto and shiny but not in Rstudio when with R 4.4.0
With the new update of R version 4.4.0, mapview and leaflet do not render in the viewer window of RStudio but do render when used in shiny applications or quarto documents.
These will preview fine in ...
0
votes
0
answers
37
views
Fitting a Long Legend Within Mapview
I like what mapview outputs but can't really use it with with the burst option (seems to make legend interactive and zooms to group on click) as there's no way to adjust the scale of the legend. Is ...
5
votes
1
answer
376
views
raster and polygons in leaflet, without raster interpolation
I'm trying to display several layers in leaflet (or mapview), one of which is a raster in EPSG:27700. The only way I manage to adequately overlay those layers is through the default latlong projection,...
2
votes
1
answer
255
views
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 ...
1
vote
1
answer
520
views
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 ...
0
votes
0
answers
434
views
reduce file size of exported leaflet html by linking several layers to the same data (json) instead of keeping the information separately
Generating leaflet html's easily results in a 50-75 MB file (depending on the number of layers). However, they can be zipped to reduce the file size by factors. So i guess there is lots of repetitive ...
0
votes
2
answers
273
views
Map average value on a Choropleth map
I am creating a shiny app that:
Allows the user to upload a shapefile (sf_object) "filemap".
Based on the uploaded shapefile, the user will then be able to
select a column/variable of ...
1
vote
0
answers
309
views
Overlay raster RGB and polygon layer in leaflet/mapview with custom CRS in R
I am trying to use R mapview/plainview or leaflet to display a raster RGB with a second layer that is a vector-based (spatial points or polygon) on top that I can toggle on an doff. It is important ...
0
votes
1
answer
92
views
How to change a MapView's main data
I'm trying to use observeEvent() to change the Mapview's x argument to new data. I'd normally just use clearShapes() then addPolygons(), but need the zcol etc. arguments.
I'd like to do something ...
0
votes
0
answers
1k
views
how to increase the resolution of leaflet maps in R Shiny
I am struggling how to save leaflet maps in a Shiny app in a high resolution.
In the following code a leaflet map is made, and the map can be downloaded by pressing the 'download' button:
library(...
2
votes
1
answer
1k
views
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)
...
1
vote
1
answer
964
views
How do i get mapview to plot my raster image with the same colors as plotRGB or plot
I have a raster file that I have exported from ArcGIS as a georeferenced tif file.
The raster will be used as a background map in mapview because the mapview background layers CartoDB.Positron, ...
0
votes
1
answer
995
views
Shiny mapshot to export leaflet into a knitted document
I have a shiny app I'm using to visualize a variety of data. One of the plots produced is a map. I'm allowing the user to download all the plots at once as a single Word doc using a knitted document. ...
5
votes
0
answers
2k
views
Why have I lost ability to use mapshot
I've been using mapshot a lot to send interactive maps of data but recently, although I can make the maps I want with mapview, I can't save them.
Example:
map<- mapview(mapdata, zcol = "...
2
votes
0
answers
488
views
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 ...