Skip to content

Offline search tweaks - #1120

Merged
davecraig merged 4 commits into
Scottish-Tech-Army:mainfrom
davecraig:main
Sep 28, 2026
Merged

davecraig merged 4 commits into
Scottish-Tech-Army:mainfrom
davecraig:main

Conversation

@davecraig

Copy link
Copy Markdown
Contributor

No description provided.

davecraig and others added 4 commits September 28, 2026 15:24
With no offline extracts, a category search falls back to the POIs in
the loaded grid. A place mapped as a building with entrances is in there
both as its outline and as each of its entrances, and both were listed:
the outline at 0,0, because deferredToLocationDescription only has a
location of its own for a point. Searching "supermarket" in Milngavie
listed every supermarket twice, and Waitrose three times.

As in Places Nearby, a POI with entrances is now found by its entrances,
anything which isn't a point is placed at its nearest point, and a named
place found by more than one entrance is listed once.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01THRgoVbh1G3pVacd7csDqJ
Searching "toilet" found the unnamed toilets by Milngavie station (OSM
way 218224201) but listed them as "Milngavie" - their address took the
empty name's place, and the type is only shown under a real name - and
listed them twice, as the building crosses a tile boundary and its
per-tile rank made the two copies look different. An unnamed place found
by type is now named by its type ("Restroom") with its address below,
from the offline tiles and from the loaded grid alike, and rank is
ignored when merging tile copies.

Photon only indexes named places, so in Auto mode it found almost no
toilets, benches or post boxes. The offline search now always runs too,
and the two are merged nearest first, dropping a Photon result with the
same name as an offline one within 100m.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01THRgoVbh1G3pVacd7csDqJ
With no offline map covering the user's location, an offline search -
no network, or search set to work offline - can only find markers, so
"roselea drive" found nothing with no explanation. The search bar now
says there's no offline map downloaded for where they are.

Coverage comes from each extract's .geojson sidecar area, or for an
extract from before sidecars were written, from whether it has the tile
at the location; having maps of other cities doesn't count.
featureContainsLocation moves out of OfflineMapManager to be shared.

The category search's fallback to the POIs in the loaded grid is
removed: its answer from a small area looked like a complete one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01THRgoVbh1G3pVacd7csDqJ
@davecraig
davecraig merged commit 99ca169 into Scottish-Tech-Army:main Sep 28, 2026
4 checks passed

This branch was successfully deployed

1 active deployment
development — 9fadf455 Deployed Sep 28, 2026 by davecraig via lint #1561
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant