MapLibre GL JS
API Reference
On This Page
Display simple Marker on the Map
This tutorial shows how to add a default Marker to the map.
You will learn the following:
- Initialize map and load the style.
- Add the marker.
View complete source code on GitHub
-
Initialize map and load the style (see get started tutorial)
-
Add the marker
var marker = new maplibregl.Marker() .setLngLat([12.550343, 55.665957]) .addTo(map);