KSvend Claude Happy commited on
Commit Β·
7773924
1
Parent(s): d41238e
fix: switch basemap from demo tiles to CARTO Positron
Browse filesReplace MapLibre demo tiles (country outlines only) with CARTO Positron
basemap showing roads, cities, and place labels so users can locate
their programme areas.
Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
- frontend/js/map.js +4 -2
frontend/js/map.js
CHANGED
|
@@ -3,6 +3,8 @@
|
|
| 3 |
* Manages the AOI definition map (Define Area page) and the results map.
|
| 4 |
*/
|
| 5 |
|
|
|
|
|
|
|
| 6 |
/* ββ AOI Map βββββββββββββββββββββββββββββββββββββββββββββββ */
|
| 7 |
|
| 8 |
let _aoiMap = null;
|
|
@@ -19,7 +21,7 @@ export function initAoiMap(containerId, onAoiChange) {
|
|
| 19 |
|
| 20 |
_aoiMap = new maplibregl.Map({
|
| 21 |
container: containerId,
|
| 22 |
-
style:
|
| 23 |
center: [37.0, 3.0], // East Africa default
|
| 24 |
zoom: 4,
|
| 25 |
});
|
|
@@ -145,7 +147,7 @@ let _resultsMap = null;
|
|
| 145 |
export function initResultsMap(containerId, bbox) {
|
| 146 |
_resultsMap = new maplibregl.Map({
|
| 147 |
container: containerId,
|
| 148 |
-
style:
|
| 149 |
bounds: [[bbox[0], bbox[1]], [bbox[2], bbox[3]]],
|
| 150 |
fitBoundsOptions: { padding: 60 },
|
| 151 |
});
|
|
|
|
| 3 |
* Manages the AOI definition map (Define Area page) and the results map.
|
| 4 |
*/
|
| 5 |
|
| 6 |
+
const MAP_STYLE = 'https://basemaps.cartocdn.com/gl/positron-gl-style/style.json';
|
| 7 |
+
|
| 8 |
/* ββ AOI Map βββββββββββββββββββββββββββββββββββββββββββββββ */
|
| 9 |
|
| 10 |
let _aoiMap = null;
|
|
|
|
| 21 |
|
| 22 |
_aoiMap = new maplibregl.Map({
|
| 23 |
container: containerId,
|
| 24 |
+
style: MAP_STYLE,
|
| 25 |
center: [37.0, 3.0], // East Africa default
|
| 26 |
zoom: 4,
|
| 27 |
});
|
|
|
|
| 147 |
export function initResultsMap(containerId, bbox) {
|
| 148 |
_resultsMap = new maplibregl.Map({
|
| 149 |
container: containerId,
|
| 150 |
+
style: MAP_STYLE,
|
| 151 |
bounds: [[bbox[0], bbox[1]], [bbox[2], bbox[3]]],
|
| 152 |
fitBoundsOptions: { padding: 60 },
|
| 153 |
});
|