Difference between revisions of "Test"
Jump to navigation
Jump to search
Line 17: | Line 17: | ||
<script> | <script> | ||
− | |||
− | |||
− | |||
var map = L.map('map').setView([10, 5], 5); | var map = L.map('map').setView([10, 5], 5); | ||
Line 27: | Line 24: | ||
attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'}).addTo(map); | attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'}).addTo(map); | ||
− | + | // load GeoJSON from an external file | |
− | + | fetch("REFUGIA_MALEY96.geojson").then(res => res.json()).then(data => { | |
− | + | // add GeoJSON layer to the map once the file is loaded | |
− | + | L.geoJson(data).addTo(map); | |
− | + | }); | |
// for Layer Control | // for Layer Control | ||
var baseMaps = { | var baseMaps = { |
Revision as of 08:34, 25 February 2022