Improve Spatial MATCHED_OBJECTS for Amenity (icons, 2-way many-to-many hover, additional name, etc)#1884
Open
RZR-UA wants to merge 10 commits into
Open
Improve Spatial MATCHED_OBJECTS for Amenity (icons, 2-way many-to-many hover, additional name, etc)#1884RZR-UA wants to merge 10 commits into
RZR-UA wants to merge 10 commits into
Conversation
alisa911
reviewed
Jul 21, 2026
alisa911
left a comment
Contributor
There was a problem hiding this comment.
The PR violates some of the rules in CLAUDE.md. Also, please review your own code yourself after the LLM.
Contributor
There was a problem hiding this comment.
Pull request overview
Enhances OsmAnd Web Map’s spatial search “matched objects” UX by adding richer hover/selection behavior (including many-to-many hover mapping), improved marker/icon handling, and better map navigation via optional bounding boxes.
Changes:
- Add support for multi-entity hover/selection (hover ids arrays) and applying multiple hovered pins simultaneously.
- Surface additional matched amenity/name details in search results and enable direct navigation/selection from those matched entries.
- When bbox metadata is present, prefer
fitBoundsover point panning for more accurate map framing.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| map/src/util/hooks/map/useSelectMarkerOnMap.js | Support multi-id hover matching across layers and apply multiple hover pins. |
| map/src/menu/search/search/SearchResults.jsx | Adjust default search input value selection logic. |
| map/src/menu/search/search/SearchResultItem.jsx | Show additional matched object names and enable navigation/selection from them. |
| map/src/menu/search/search/CustomInput.jsx | Refactor clear-search logic and keep focus after clearing. |
| map/src/menu/search/search.module.css | Add styling for matched object names and hover underline behavior. |
| map/src/map/util/MarkerSelectionService.js | Add applySelectedPins + support restoring multiple updated layers. |
| map/src/map/util/Clusterizer.js | Emit multi-id hover payloads from marker tooltips (many-to-many hover). |
| map/src/map/layers/SearchLayer.js | Create/attach matched amenity markers and fit to bbox when provided. |
| map/src/infoblock/components/wpt/WptTagsProvider.js | Add bbox tag constant for search/map interactions. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
osmandapp/OsmAnd#25331
Test cases
POI_TYPE+Street -- https://test.osmand.net/map/search/result/?engine=spatial&query=shell+einsteinova#16/48.1658/17.1038
POI_TYPE+Amenity(city) -- https://test.osmand.net/map/search/result/?engine=spatial&query=shell+bratislava#16/48.2737/17.0306
Amenity+Amenity -- https://test.osmand.net/map/search/result/?engine=spatial&query=shell+mcdonalds#19/48.21644/16.50539
Amenity(noname)+Amenity -- https://test.osmand.net/map/search/result/?engine=spatial&query=fuel+mcdonalds#13/48.1511/17.1454
Amenity+Amenity(noname) -- https://test.osmand.net/map/search/result/?engine=spatial&query=mcdonalds+fuel#13/48.1511/17.1454
Amenity+Amenity -- https://test.osmand.net/map/search/result/?engine=spatial&query=%D0%A5%D0%BB%D1%96%D0%B1%D0%BD%D0%B0+%D0%9A%D0%B0%D0%B2%D0%B0+fuel#12/50.4486/30.5750 (Хлібна Кава)
Amenity+Amenity -- https://test.osmand.net/map/search/result/?engine=spatial&query=fuel+%D0%A5%D0%BB%D1%96%D0%B1%D0%BD%D0%B0+%D0%9A%D0%B0%D0%B2%D0%B0#12/50.4486/30.5750 (Хлібна Кава)
Amenity+Street -- https://test.osmand.net/map/search/result/?engine=spatial&query=Shell+Einsteinova#14/48.1319/17.1527
Street+City -- https://test.osmand.net/map/search/result/?engine=spatial&query=bratislava+einsteinova#14/48.1340/17.1299
Brand+City / Amenity+City -- https://test.osmand.net/map/search/result/?engine=spatial&query=shell+bratislava#14/48.1508/17.1206