R/make_location_layers.R

Defines functions make_location_layers

#' Make map layers from location and data lists
#'
#' @example examples/make_location_layers.R
#' @noRd
#' @importFrom rlang enquo
make_location_layers <- function(data = NULL,
                                 location = NULL,
                                 geom = NULL,
                                 mapping = NULL,
                                 params = NULL) {
  data <- as_sf_list(data)
  location <- as_sf_list(location, nm = "location")
  mapping <- rlang::enquo(mapping)

  c(
    data, location,
    list(
      "geom" = geom,
      "mapping" = mapping
      # params
    )
  )
}
elipousson/overedge documentation built on Aug. 13, 2022, 7:41 p.m.