add_vector_source function

Add a vector tile source to a Mapbox GL or Maplibre GL map

Add a vector tile source to a Mapbox GL or Maplibre GL map

add_vector_source(map, id, url)

Arguments

  • map: A map object created by the mapboxgl or maplibre function.
  • id: A unique ID for the source.
  • url: A URL pointing to the vector tile source.

Returns

The modified map object with the new source added.

  • Maintainer: Kyle Walker
  • License: MIT + file LICENSE
  • Last published: 2025-03-18