Initial commit
This commit is contained in:
20
js/index.js
Normal file
20
js/index.js
Normal file
@@ -0,0 +1,20 @@
|
||||
document.addEventListener('DOMContentLoaded', async () => {
|
||||
const map = L.map('map').setView([27.49, -9.3], 3);
|
||||
|
||||
map.crs = L.CRS.EPSG4326;
|
||||
|
||||
const geoJSON = await fetch('/world.geojson').then(res => res.json());
|
||||
|
||||
L.geoJson(geoJSON,{
|
||||
style: function () {
|
||||
return {
|
||||
color: '#fff',
|
||||
opacity: 0.4,
|
||||
weight: 2,
|
||||
fillColor: '#19365e',
|
||||
fillOpacity: 1
|
||||
};
|
||||
}
|
||||
}).addTo(map);
|
||||
|
||||
})
|
||||
Reference in New Issue
Block a user