Add tag-based search to feature list (e.g. building=yes)#11997
Add tag-based search to feature list (e.g. building=yes)#11997VaibhavSingh2006 wants to merge 5 commits intoopenstreetmap:developfrom
Conversation
|
Screenshots look nice! Can you share another small screenshot of the search box filled-in? (I don't get where is it) |
|
@valerio-bozzolan Thanks for the feedback! Here is a screenshot showing the search box filled with the query Let me know if you'd like me to add more examples.
|
|
|
||
|
|
||
| function keypress(d3_event) { | ||
| var q = search.property('value'), |
There was a problem hiding this comment.
Please keep this line indented as it was before
(so diff is minimal)
same for other lines, if possible
|
I've added a comment on a specific line, but please consider improving indentation in general, so to have super-clean 'git diff', so other reviewers with +1 permissions are attracted (I have no such permissions) |
|
@valerio-bozzolan , Thanks for the suggestion! I restored the original indentation to keep the diff minimal. |
|
There are still some whitespace changes. |
|
@matkoniecz, Thanks for the feedback! I’ve cleaned up the remaining whitespace and indentation changes so the diff should now only contain the functional changes. Could you please take another look? |
|
@matkoniecz can you check it now please! |
|
Small code proposal: let's save the regex in one single place, like: So to re-use it, like etc. |
|
@valerio-bozzolan, Thanks for the suggestion! I've moved the regex into a reusable constant and updated both usages. |


Fixes #11980
Adds support for searching features by tag in the feature list.
Users can now search using queries like:
Pressing Enter selects all matching entities within the current viewport.
I tested this by searching tags such as
building=yesandroof:shape=flat.The results update based on the current viewport (zoom level), and pressing Enter selects all matching features.
Screenshots of the behavior are attached for reference.
1).Zoomed

2).Normal
