Type: | Package |
Title: | Leaflet Providers |
Version: | 2.0.0 |
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. |
License: | BSD_2_clause + file LICENSE |
URL: | https://rstudio.github.io/leaflet.providers/, https://github.com/rstudio/leaflet.providers |
BugReports: | https://github.com/rstudio/leaflet.providers/issues |
Depends: | R (≥ 2.10) |
Imports: | htmltools |
Suggests: | jsonlite, testthat (≥ 3.0.0), V8 |
Config/Needs/website: | tidyverse/tidytemplate |
Config/testthat/edition: | 3 |
Encoding: | UTF-8 |
Language: | en-US |
RoxygenNote: | 7.2.3 |
Collate: | 'providers_data.R' 'get_current_providers.R' 'leaflet.providers-package.R' 'zzz.R' |
NeedsCompilation: | no |
Packaged: | 2023-10-17 12:24:21 UTC; garrick |
Author: | Leslie Huang [aut],
Barret Schloerke |
Maintainer: | Barret Schloerke <barret@posit.co> |
Repository: | CRAN |
Date/Publication: | 2023-10-17 17:10:02 UTC |
leaflet.providers: 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.
Author(s)
Maintainer: Barret Schloerke barret@posit.co (ORCID) [contributor]
Authors:
Leslie Huang lesliehuang@nyu.edu
Other contributors:
Leaflet Providers contributors (Leaflet Providers plugin) [contributor, copyright holder]
Posit Software, PBC [copyright holder, funder]
See Also
Useful links:
Report bugs at https://github.com/rstudio/leaflet.providers/issues
Fetch leaflet providers from Leaflet.js.
Description
Fetch leaflet providers from Leaflet.js.
Usage
get_providers(version_num = NULL)
Arguments
version_num |
Version number with which to update leaflet providers.
If |
Value
leaflet_providers
object containing providers_version_num
, providers_data
,
providers_details_data
, src
Examples
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.
Description
Return default providers, providers_details, version, and HTML Dependency.
Usage
providers_default()
Value
leaflet_providers
object containing providers_version_num
, providers
,
providers_details
, and src
Examples
str(providers_default(), max = 3, list.len = 4)
Return currently loaded providers, providers_details, version, and HTML Dependency.
Description
Return currently loaded providers, providers_details, version, and HTML Dependency.
Usage
providers_loaded()
Value
leaflet_providers
object containing providers_version_num
, providers
,
providers_details
, and src
Examples
str(providers_loaded(), max = 3, list.len = 4)
Use custom tile provider
Description
Use a custom leaflet_providers
object, e.g. providers data fetched with
get_providers, with the leaflet
package.
Usage
use_providers(providers_info = NULL)
Arguments
providers_info |
A custom |
Examples
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")
}