Skip to content

Intro

This file is intended as a reference for the important and public classes of this API. We recommend looking at the examples as they will help you the most to start with MapLibre.

Most of the classes written here have an "Options" object for initialization, it is recommended to check which options exist.

It is recommended to import what you need and the use it. Some examples for classes assume you did that. For example, import the Map class like this:

import {Map} from 'maplibre-gl';
const map = new Map(...)

Import declarations are omitted from the examples for brevity.

Main

Markers and Controls

Geography and Geometry

Handlers

Sources