mn_cache_dir: Manage downloaded map data

View source: R/cache.R

mn_cache_dirR Documentation

Manage downloaded map data

Description

Full-resolution boundaries and the larger thematic layers are downloaded the first time you use them and kept in a cache folder, so later calls work offline.

Usage

mn_cache_dir()

mn_cache_list()

mn_cache_clear(layers = NULL, old_versions = FALSE)

mn_download(layers = "all")

Arguments

layers

Layer ids or groups (see mn_sources()), such as "admin_high" or "osm". NULL (the default for mn_cache_clear()) means all; "all" (the default for mn_download()) means every downloadable layer.

old_versions

If TRUE, mn_cache_clear() removes only data left by older versions of the package.

Details

  • mn_cache_dir() returns the cache folder. Change it with options(mongolmaps.cache_dir = "path").

  • mn_cache_list() lists what is cached.

  • mn_cache_clear() deletes cached files.

  • mn_download() downloads layers now, for example before fieldwork without internet. See mn_sources() for the layer ids.

Value

mn_cache_dir(): a path. mn_cache_list(): a tibble with one row per cached file. mn_cache_clear() and mn_download(): the affected paths, invisibly.

See Also

Other data sources and cache: mn_sources()

Examples

mn_cache_dir()
mn_cache_list()

mn_download("admin_high")


mongolmaps documentation built on Oct. 10, 2026, 5:08 p.m.