An R package that provides methods for interactive plotting of spatial objects from the sf, sp and raster packages.
Questions tagged [r-mapview]
85 questions
0
votes
1 answer
Use If clauses in shiny output depending on the existence of input
I'm relatively new to shiny and have been encountering the following problem :
I want to display a map (using mapview) with a checkboxinput (filtering stuff) and a different map when all the boxes are unchecked.
Displaying the map and the reactive…

Maxence
- 19
- 5
0
votes
0 answers
compress file size of exported leaflet html
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 information in the HTML. The data is the same for…

Beni
- 191
- 9
0
votes
1 answer
package installation error with 'mapview' package
I am trying to install the 'mapview' package in R. I tried restarting R, clearing the environment, terminating all the sessions, and restarting and with a totally new session.But I keep getting same error message:
Error in loadNamespace(i,…
0
votes
2 answers
R Shiny Leaflet/Mapview 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 interest to plot a an average temperature value…

Ed_Gravy
- 1,841
- 2
- 11
- 34
0
votes
1 answer
Locking the zoom in on Mapview?
I am creating a map plotted with points around the UK map with map view library in R. I want to have a fixed zoom or zoom button disabled. I don't want a Street view/Zoom in due to GDPR issues. I wonder if there is a solution for this?…

Inshal Khan
- 22
- 4
0
votes
1 answer
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 similar to the following:
server <- function(input,…

Warpspace
- 3,215
- 3
- 21
- 24
0
votes
0 answers
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'…

WJH
- 539
- 5
- 14
0
votes
0 answers
popupTable shows same values for every polygon when using multiple layers/columns
popupTable works fine with mapview when I use only one column but it stops working when defining multiple zcols, eg. mapview(map, zcol=c("variable1", "variable2", popup=popupTable(map, zcol=c("column1","column2","column4")). For every popup on the…

Centure
- 51
- 1
- 3
0
votes
1 answer
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. I would like to include the map in the document,…

user2602640
- 640
- 6
- 21
0
votes
1 answer
Mapview pointsize via cex is not a fix size mapping subset or updated data
Good New Year!
Actually I want to show on a map CoVid19 cases. I have the adresses of each case.
I plot for each case a piont on the map. This works fine!
Some adresses have more than one case (e.g. one familiy). Therefor I want to control the size…

Volker Holzendorf
- 237
- 2
- 10
0
votes
0 answers
How to set boundaries with leaflet and export to pdf with mapshot?
I have been trying for the whole day now to create a map an export it to a pdf. The problem is that I don't really understand how to either set "width" and "height" or use "fitBounds". Also I would like to crop this "Leaflet" logo at the bottom…

titeuf
- 133
- 1
- 10
0
votes
1 answer
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(mapview)
mapview(breweries)
And here is a screenshot…

www
- 38,575
- 12
- 48
- 84
0
votes
1 answer
In mapview, can I associate symbols other than circles to the data?
The default symbol when plotting any latitude-longitude data in mapview is a circle. What if I'd like to associate a square or "x" to the points on the map? Is there a way to use different symbols?
Alternatively, can another package get the job…

user2438292
- 87
- 9
0
votes
0 answers
R: Error when using viewRGB() and editMap()
Below is the code I am using:
if (interactive()) {
library(raster)
library(plainview)
viewRGB(plainview::poppendorf, 4, 3, 2) # true-color
viewRGB(plainview::poppendorf, 5, 4, 3) # false-color
}
I got the following error message:
Error in…

B.B.Zhou
- 1
0
votes
0 answers
map sending back an active reactive error
Putting together a map on Shiny, but keep running into an error. When I use the same steps using Leaflet, it runs fine, but when I use mapview, it does not. Unfortunately, I can't provide the data for a reproducible example, seeing as it involves a…
user9302275