R/helpers.R

## Process map styles

.styles_to_url = function (style) {
  .check_map_style(style)
  style |>
    lapply(\(x) paste(names(x), x, sep = ':')) |>
    sapply(\(x) paste0(x, collapse = '|')) |>
    paste0(collapse = '&style=')
}   

Try the mapsapi package in your browser

Any scripts or data that you put into this service are public.

mapsapi documentation built on July 26, 2023, 5:20 p.m.