Skip to contents

Add an image source to a Mapbox GL or Maplibre GL map

Usage

add_image_source(map, id, url, coordinates)

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 image source.

coordinates

A list of coordinates specifying the image corners in clockwise order: top left, top right, bottom right, bottom left.

Value

The modified map object with the new source added.