Spaces:
Running
Running
Commit History
-
// Initialize map
Verified signaturevar map = L.map('map').setView([10.6411, -61.3995], 16); L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { maxZoom: 21, attribution: '© OpenStreetMap contributors' }).addTo(map); // Variables to hold layers var buildingsLayer, roadsLayer, walkwaysLayer, poisLayer; var promises = []; // Also load blocks from backend once, so we can resolve block_id -> block_name quickly let blockMap = new Map(); // block_id -> block_name promises.push( fetch('/blocks').then(r => r.json()).then(rows => { rows.forEach(b => blockMap.set(b.block_id, b.name)); }) ); // Load Buildings promises.push( fetch('data/st_augustine_buildings.geojson') .then(res => res.json()) .then(data => { buildingsLayer = L.geoJSON(data, { style: { color: 'black', fillColor: 'lightgrey', weight: 1 }, onEachFeature: function(feature, layer) { if (feature.properties && feature.properties.name) { layer.bindPopup("Building: " + feature.properties.n…55ac8d9 -
you just gave me a blacnk screen with nothing one it
Verified signature300e434