Adapters
Adapters are thin wrappers that contain map library specific logic, for creating and updating layers rendered by the mapping library. Terra Draw supports a series of Adapters out of the box, with a series of packages within this monorepo. Currently supported are: Leaflet, OpenLayers, Mapbox GL JS, MapLibre GL JS, Google Maps JS API and the ArcGIS JS SDK.
In this workshop, we use maplibre as mapping library, you can install the Maplibre adapter (TerraDrawMapLibreGLAdapter) in the following way:
npm install terra-draw-maplibre-gl-adapter
import { TerraDrawMapLibreGLAdapter } from 'terra-draw-maplibre-gl-adapter';
const adapter = new TerraDrawMapLibreGLAdapter({ map, lib });
See the Adapters section in the official documentation.