Learn R Programming

mapview (version 1.1.0)

mapviewOptions: Global options for the mapview package

Description

To permanently set any of these options, you can add them to /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

Usage

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)

Arguments

platform
character. The platform to be used (currently only "leaflet" is allowed)
basemaps
character. The basemaps to be used for rendering data. See http://leaflet-extras.github.io/leaflet-providers/preview/ for possible values
raster.size
numeric. see the maxBytes argument in addRasterImage
mapview.maxpixels
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.
plainview.maxpixels
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.
maxpoints
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.
maxpolygons
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.
maxlines
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.
raster.palette
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.
vector.palette
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.
verbose
logical. Many functions in mapview provide details about their behaviour. Set this to TRUE if you want to see these printed to the console.
na.color
character. The default color to be used for NA values.
legend
logical. Whether or not to show a legend for the layer(s).
legend.pos
Where should the legend be placed? One of "topleft", "topright", "bottomleft", "bottomright".
layers.control.pos
character. Where should the layer control be placed? One of "topleft", "topright", "bottomleft", "bottomright".
default
logical. If TRUE all options are set to their default values
console
logical. Should the options be printed to the console
leafletWidth, leafletHeight
height and width of the htmlwidget in px.
param
character. parameter to be queried.

Value

list of the current options (invisibly). If no arguments are provided the options are printed.

Functions

  • mapviewGetOption: query single mapviewOption parameters

See Also

rasterOptions, options

Examples

Run this code
## Not run: 
# mapviewOptions()
# mapviewOptions(na.color = "pink")
# mapviewOptions()
# 
# mapviewGetOption("platform")
# ## End(Not run)


Run the code above in your browser using DataLab