Offline search tweaks - #1120
Merged
Merged
Conversation
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
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01THRgoVbh1G3pVacd7csDqJ
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.