add_image_source | R Documentation |
Add an image source to a Mapbox GL or Maplibre GL map
add_image_source(
map,
id,
url = NULL,
data = NULL,
coordinates = NULL,
colors = NULL
)
map |
A map object created by the |
id |
A unique ID for the source. |
url |
A URL pointing to the image source. |
data |
A |
coordinates |
A list of coordinates specifying the image corners in clockwise order: top left, top right, bottom right, bottom left. For |
colors |
A vector of colors to use for the raster image. |
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.