Add a default marker
Add a default marker to your map.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<script src="https://cdn.smartmaps.cloud/packages/smartmaps/smartmaps-gl/v2/umd/smartmaps-gl.min.js"></script>
<style>
body {
margin: 0;
padding: 0;
}
html,
body,
#map {
height: 100%;
}
</style>
</head>
<body>
<div id="map"></div>
<script>
const map = new smartmapsgl.Map({
apiKey: "INSERT API-KEY",
container: "map",
center: [8.439330018049352, 49.02164948779226],
zoom: 12,
style: smartmapsgl.MapStyle.AUTO
});
const marker = new smartmapsgl.Marker()
.setLngLat([8.439330018049352, 49.02164948779226])
.addTo(map);
</script>
</body>
</html>