View source: R/tmap_providers.R
| .tmap_providers | R Documentation |
Get basemap tile providers and their credits (attribution text).
tmap_providers() returns a list or vector of provider names or
credits. tmap_provider_credits() returns the attribution text for a
specific provider.
.tmap_providers
tmap_provider_credits(provider)
tmap_providers(mode, credits = FALSE, as.list = credits)
provider |
provider name |
mode |
mode. If not specified the current active mode is used. |
credits |
If |
as.list |
Should the output be returned as a list where names are
provider names? By default |
.tmap_providers is an environment populated with all available
provider names as named entries. Its primary purpose is to enable
autocomplete in IDEs such as RStudio: typing .tmap_providers$ in the
console or a script triggers a dropdown list of all available providers,
making it easy to discover and select provider names without consulting the
documentation. It is not intended to be called as a function.
tmap_providers() returns a list or vector (see
as.list) of provider names or credits.
tmap_provider_credits() returns the attribution text for the
specified provider. .tmap_providers is an environment; see
Details.
# List all providers for the current mode
tmap_providers()
# Use IDE autocomplete to discover providers interactively:
# type .tmap_providers$ in the RStudio console
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.