JSFiddle - React, Tailwind, and code Playground
HTML
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css" />
<script src="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.js"></script>
<body>
<div id="map"></div>
<script src="js/exercitii.js"></script>
</body>
CSS
body, html{
height: 100%;
width: 100%;
margin: 0px;
padding: 0px;
}
#map {
height: 100%;
width: 100%;
margin: 0px;
padding: 0px;
}
JavaScript
var marker;
var map = L.map('map', {
center: [44.683250, 22.629069],
zoom: 10,
layers: L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png'),
setView: true
})
var coordinates = [[44.68, 22.62], [44.69,22.62],[44.67,22.62]]
for (i=0;i<coordinates.length;i++){
marker = L.marker([coordinates[i][0], coordinates[i][1]])
}
markergroup = {'marker': marker}
L.control.layers(null, markergroup).addTo(map)