R/styles.R

Defines functions use_carto_style

Documented in use_carto_style

#' Use a Carto style
#'
#' @param theme The theme of the style, \code{dark-matter}, \code{positron} or \code{voyager}.
#' @export
use_carto_style <- function(theme = "dark-matter") {
  if (!theme %in% c("dark-matter", "voyager", "positron")) {
    stop("Unknown theme.")
  }

  sprintf("https://basemaps.cartocdn.com/gl/%s-gl-style/style.json", theme)
}
crazycapivara/deckgl documentation built on March 29, 2023, 4:10 a.m.