Showing open & vouched for public work spaces in an easy to view map.
1// config map
2let config = {
3 minZoom: 3,
4 // maxZoom: 18,
5
6};
7// magnification with which the map will start
8const zoom = 5;
9// co-ordinates
10const lat = 40.713830752389896;
11const lng = -98.18415927140622;
12
13var cafeDarkIcon = L.icon({
14 iconUrl: './cafe-black.png',
15 // shadowUrl: 'leaf-shadow.png',
16
17 iconSize: [20, 20], // size of the icon
18 iconAnchor: [22, 94], // point of the icon which will correspond to marker's location
19 popupAnchor: [-3, -76] // point from which the popup should open relative to the iconAnchor
20});
21
22// calling map
23const map = L.map("map", config).setView([lat, lng], zoom);
24
25// Used to load and display tile layers on the map
26// Most tile servers require attribution, which you can set under `Layer`
27L.tileLayer("https://tile.openstreetmap.org/{z}/{x}/{y}.png", {
28 attribution:
29 '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
30}).addTo(map);
31
32L.marker([44.168530, -72.865840], { icon: cafeDarkIcon }).addTo(map);