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] , Leaflet Providers contributors [ctb, cph] (Leaflet Providers plugin), Posit Software, PBC [cph, fnd] |
Maintainer: | Barret Schloerke <[email protected]> |
License: | BSD_2_clause + file LICENSE |
Version: | 2.0.0.9000 |
Built: | 2024-11-10 05:45:31 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 ( interactive() && requireNamespace("V8", quietly = TRUE) && requireNamespace("jsonlite", quietly = TRUE) ) { get_providers() get_providers("1.8.0") }
if ( interactive() && requireNamespace("V8", quietly = TRUE) && requireNamespace("jsonlite", quietly = TRUE) ) { get_providers() get_providers("1.8.0") }
Return default providers, providers_details, version, and HTML Dependency.
providers_default()
providers_default()
leaflet_providers
object containing providers_version_num
, providers
,
providers_details
, and src
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()
leaflet_providers
object containing providers_version_num
, providers
,
providers_details
, and src
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 (require("V8") && require("jsonlite")) { # Set providers to latest providers use_providers(get_providers()) # Set providers to a custom providers object (specific version number) use_providers(get_providers("1.4.0")) use_providers("1.4.0") }
if (require("V8") && require("jsonlite")) { # Set providers to latest providers use_providers(get_providers()) # Set providers to a custom providers object (specific version number) use_providers(get_providers("1.4.0")) use_providers("1.4.0") }