| Title: | Leaflet Providers |
|---|---|
| Description: | Contains third-party map tile provider information from 'Leaflet.js', <https://github.com/leaflet-extras/leaflet-providers>, to be used with the 'leaflet' R package. Additionally, 'leaflet.providers' enables users to retrieve up-to-date provider information between package updates. |
| Authors: | Leslie Huang [aut], Barret Schloerke [ctb, cre] (ORCID: <https://orcid.org/0000-0001-9986-114X>), Leaflet Providers contributors [ctb, cph] (Leaflet Providers plugin), Posit Software, PBC [cph, fnd] (ROR: <https://ror.org/03wc8by49>) |
| Maintainer: | Barret Schloerke <[email protected]> |
| License: | BSD_2_clause + file LICENSE |
| Version: | 3.0.0.9000 |
| Built: | 2026-05-19 05:48:37 UTC |
| Source: | https://github.com/rstudio/leaflet.providers |
Fetch leaflet providers from Leaflet.js.
get_providers(version_num = NULL)get_providers(version_num = NULL)
version_num |
Version number with which to update leaflet providers.
If |
leaflet_providers object containing providers_version_num, providers_data,
providers_details_data, src
if ( requireNamespace("V8", quietly = TRUE) && requireNamespace("jsonlite", quietly = TRUE) ) { get_providers() get_providers("2.0.0") }if ( requireNamespace("V8", quietly = TRUE) && requireNamespace("jsonlite", quietly = TRUE) ) { get_providers() get_providers("2.0.0") }
Return default providers, providers_details, version, and HTML Dependency.
providers_default()providers_default()
leaflet_providers object containing version_num, providers,
providers_details, src, and dep.
str(providers_default(), max = 3, list.len = 4)str(providers_default(), max = 3, list.len = 4)
Return currently loaded providers, providers_details, version, and HTML Dependency.
providers_loaded()providers_loaded()
A list containing version_num, providers,
providers_details, src, and dep.
str(providers_loaded(), max = 3, list.len = 4)str(providers_loaded(), max = 3, list.len = 4)
Use a custom leaflet_providers object, e.g. providers data fetched with
get_providers, with the leaflet package.
use_providers(providers_info = NULL)use_providers(providers_info = NULL)
providers_info |
A custom |
if ( requireNamespace("V8", quietly = TRUE) && requireNamespace("jsonlite", quietly = TRUE) ) { # Set providers to latest providers use_providers(get_providers()) # Set providers to a custom providers object (specific version number) use_providers(get_providers("1.8.0")) use_providers("1.8.0") }if ( requireNamespace("V8", quietly = TRUE) && requireNamespace("jsonlite", quietly = TRUE) ) { # Set providers to latest providers use_providers(get_providers()) # Set providers to a custom providers object (specific version number) use_providers(get_providers("1.8.0")) use_providers("1.8.0") }