Merge branch 'main' of https://github.com/nowcommunity/nowdatabase into locality-filtering

This commit is contained in:
arttu
2025-05-28 12:52:45 +03:00
2 changed files with 20 additions and 6 deletions
+3 -1
View File
@@ -6,5 +6,7 @@
"eslint.workingDirectories": [
{ "directory": "./frontend", "changeProcessCWD": true },
{ "directory": "./backend", "changeProcessCWD": true }
]
],
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
}
+17 -5
View File
@@ -78,17 +78,29 @@ export const LocalitiesMap = ({ localitiesQueryData, localitiesQueryIsFetching }
noWrap: true,
})
const baseMaps = {
OpenTopoMap: topomap,
OpenStreetMap: osm,
}
// LAYERS ON TOP OF BASE MAPS
//// Add borders to the map
borders.forEach(poly => {
L.polygon(poly as LatLngExpression[], { color: 'gray', weight: 1 }).addTo(map)
})
// create a polygon layer for the country borders that is in layer control panel
const borderLayer = L.layerGroup()
borders.forEach(country_border => {
const polygon = L.polygon(country_border as LatLngExpression[], {
color: '#136f94',
fillOpacity: 0.3,
weight: 1,
})
borderLayer.addLayer(polygon)
})
const baseMaps = {
OpenTopoMap: topomap,
OpenStreetMap: osm,
Countries: borderLayer,
}
// Add a scale bar to the map
L.control.scale({ position: 'bottomright' }).addTo(map)
// Add a layer control to the map