add_source | R Documentation |
Add a GeoJSON or sf source to a Mapbox GL or Maplibre GL map
add_source(map, id, data, ...)
map |
A map object created by the |
id |
A unique ID for the source. |
data |
An sf object or a URL pointing to a remote GeoJSON file. |
... |
Additional arguments to be passed to the JavaScript addSource method. |
The modified map object with the new source added.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.