Add a vector tile source to a Mapbox GL or Maplibre GL map
add_vector_source(map, id, url = NULL, tiles = NULL, promote_id = NULL, ...)The modified map object with the new source added.
A map object created by the mapboxgl or maplibre function.
A unique ID for the source.
A URL pointing to the vector tile source.
A vector of tile URLs, typically in the format "https://example.com/{z}/{x}/{y}.mvt" or similar.
An optional property name to use as the feature ID. This is required for hover effects on vector tiles.
Additional arguments to be passed to the JavaScript addSource method.