For R's mapview package, can I explicitly set map.types to NULL?

578 Views Asked by At

Can I explicitly set map.types to NULL? This does not work as expected. Basically, I don't want the base maps to render.

library(mapview)
mapView(breweries, map.types = NULL)

I don't want to eliminate the associated CRS. I just want to eliminate the base maps that automatically render.

2

There are 2 best solutions below

1
On BEST ANSWER

As of this post, the current development version (2.8.1) of mapview from Github has the desired functionality. Just set map.types = NULL. Thanks to TimSalabim for the heads up.

3
On

You can plot on a blank background after removing the CRS of the shapefile by setting it to NA.

library(mapview)
mapview(st_set_crs(breweries, NA))

Your comment indicates that you do not want to remove the crs from your shapefiles. I wanted to point out that the above function does not remove the crs from your shapefile permanently.

enter image description here