Polygons

L.polygon.

L.polygon. Enable Leaflet. Keep #map { height: 320px } in CSS.

Goal

Run every block and confirm the chart is visible.

<div id="map"></div>
#map { height: 320px; width: 100%; }
const map = L.map("map").setView([-1.29, 36.82], 8);
L.tileLayer("https://tile.openstreetmap.org/{z}/{x}/{y}.png", { attribution: "© OSM" }).addTo(map);
L.polygon([[-1.2,36.7],[-1.4,36.7],[-1.3,36.95]], { color: "#0f6b52" }).addTo(map);
console.log("polygon");
<div id="map"></div>
const map = L.map("map").setView([-1.29, 36.82], 6);
L.tileLayer("https://tile.openstreetmap.org/{z}/{x}/{y}.png", { attribution: "© OSM" }).addTo(map);
L.marker([-1.29, 36.82]).addTo(map);
console.log("marker");