TileCaching: Enables caching of Tiles

Description Usage Arguments Examples

Description

Enables caching of tiles locally in browser. See https://github.com/MazeMap/Leaflet.TileLayer.PouchDBCached for details. In addition to invoking this function, you should also pass useCache=TRUE & crossOrigin=TRUE in the tileOptions call and pass that to your addTiles's options parameter.

Usage

1

Arguments

map

The leaflet map

Examples

1
2
3
4
5
6
leaflet() %>%
  enableTileCaching() %>%
  addTiles(options = tileOptions(useCache = TRUE, crossOrigin = TRUE))

## for more examples see
# browseURL(system.file("examples/TileLayer-Caching.R", package = "leaflet.extras"))

Example output

Loading required package: leaflet

leaflet.extras documentation built on May 2, 2019, 2:11 a.m.