Search: look through all saved layers and offline hiking trails

GET /api/search (lib/maptool/search.rb) matches feature name and
description, case- and diacritics-insensitive, across every file in
Tracks & Points (shown or not) and every offline hiking-trails country.
Parsed features are cached in memory per file by mtime.

The search box now queries local sources and Nominatim side by side,
labels each result with where it was found, lets you untick sources,
and switches a result's layer on if it was off before zooming to it.
This commit is contained in:
randy committed 2026-11-12 11:37:42 +01:00
1 parent 2611713489
commit 0051a0337c
10 files changed
+316 -21

No files matched your search

+4
View File
@@ -249,6 +249,10 @@ export class OverlaysControl {
this._hikingTrails.setOfflineCountries(countries);
}
showHikingTrailsCountry(code) {
this._hikingTrails.showCountry(code);
}
// Called by map.js's PitchToggleControl whenever the 3D pitch toggle
// changes, so raised terrain follows the camera tilt rather than needing
// the "Terrain shading" checkbox re-clicked to notice.