init
This commit is contained in:
commit
116abafc09
58 changed files with 5749 additions and 0 deletions
42
man/protomaps_url.Rd
Normal file
42
man/protomaps_url.Rd
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/addProtomaps.R
|
||||
\name{protomaps_url}
|
||||
\alias{protomaps_url}
|
||||
\alias{protomaps_demo_url}
|
||||
\title{Get Protomaps API tile URL}
|
||||
\usage{
|
||||
protomaps_url(api_key = NULL)
|
||||
|
||||
protomaps_demo_url(api_key = NULL)
|
||||
}
|
||||
\arguments{
|
||||
\item{api_key}{Character. Your Protomaps API key. If NULL (default),
|
||||
uses the \code{PROTOMAPS_API_KEY} environment variable.}
|
||||
}
|
||||
\value{
|
||||
Character. URL template for the tile API.
|
||||
}
|
||||
\description{
|
||||
Returns a URL template for the Protomaps tile API. Requires an API key,
|
||||
which can be passed directly or set via the \code{PROTOMAPS_API_KEY}
|
||||
environment variable.
|
||||
|
||||
Get a free API key (for non-commercial use) at \url{https://protomaps.com/}.
|
||||
For commercial use or high traffic, consider self-hosting PMTiles files.
|
||||
}
|
||||
\examples{
|
||||
\dontrun{
|
||||
# Set your API key as an environment variable (recommended)
|
||||
Sys.setenv(PROTOMAPS_API_KEY = "your-api-key-here")
|
||||
leaflet() \%>\%
|
||||
addProtomaps(url = protomaps_url())
|
||||
|
||||
# Or pass the key directly
|
||||
leaflet() \%>\%
|
||||
addProtomaps(url = protomaps_url(api_key = "your-api-key-here"))
|
||||
}
|
||||
|
||||
}
|
||||
\seealso{
|
||||
\code{\link{set_protomaps_key}} for a convenient way to set the API key.
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue