To permanently set any of these options, you can add them to <your R installation>/etc/Rprofile.site>. For example, to change the default number of pixels to be visualised for Raster* objects, add a line like this: options(mapviewMaxPixels = 700000) to that file.
query single mapviewOption parameters
mapviewOptions(platform, basemaps, raster.size, mapview.maxpixels,
plainview.maxpixels, maxpoints, maxpolygons, maxlines, raster.palette,
vector.palette, verbose, na.color, legend, legend.pos, layers.control.pos,
default = FALSE, console = TRUE, leafletWidth, leafletHeight)mapviewGetOption(param)
character. The platform to be used. Current options are "leaflet" and "quickmapr".
character. The basemaps to be used for rendering data. See http://leaflet-extras.github.io/leaflet-providers/preview/ for possible values
numeric. see the maxBytes argument in addRasterImage
numeric. The maximum amount of pixels allowed for Raster*
objects to be rendered with mapview
. Defaults to 500000.
Set this higher if you have a potent machine or are patient enough to wait a little.
numeric. The maximum amount of pixels allowed for Raster*
objects to be rendered with plainview
. Defaults to 10000000.
Set this higher if you have a potent machine or are patient enough to wait a little.
numeric. Maximum number of points allowed for leaflet overlay rendering. If this number is exceeded rendering will be done using special functionality which will provide much more speed and better handling. This means that standard functionality is reduced. For example adding layers via "+" is not possible anymore.
numeric. Maximum number of polygons allowed for leaflet overlay rendering. If this number is exceeded rendering will be done using special functionality which will provide much more speed and better handling. This means that standard functionality is reduced. For example adding layers via "+" is not possible anymore.
numeric. Maximum number of lines allowed for leaflet overlay rendering. If this number is exceeded rendering will be done using special functionality which will provide much more speed and better handling. This means that standard functionality is reduced. For example adding layers via "+" is not possible anymore.
a color palette function for raster visualisation.
Should be a function that takes an integer as input and returns a vector of colors.
See colorRampPalette
for details.
a color palette function for vector visualisation.
Should be a function that takes an integer as input and returns a vector of colors.
See colorRampPalette
for details.
logical. Many functions in mapview provide details about their behaviour. Set this to TRUE if you want to see these printed to the console.
character. The default color to be used for NA values.
logical. Whether or not to show a legend for the layer(s).
Where should the legend be placed? One of "topleft", "topright", "bottomleft", "bottomright".
character. Where should the layer control be placed? One of "topleft", "topright", "bottomleft", "bottomright".
logical. If TRUE all options are set to their default values
logical. Should the options be printed to the console
height and width of the htmlwidget in px.
character. parameter to be queried.
list of the current options (invisibly). If no arguments are provided the options are printed.
mapviewGetOption
: query single mapviewOption parameters
# NOT RUN {
mapviewOptions()
mapviewOptions(na.color = "pink")
mapviewOptions()
mapviewGetOption("platform")
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab