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.
  1. Initialize map and load the style (see get started tutorial)

  2. Add the marker

     var marker = new maplibregl.Marker()
         .setLngLat([12.550343, 55.665957])
         .addTo(map);