Closed westnordost closed 3 weeks ago
Trying to understand the next actionable thing but it seems dictionary.getByTerm()
already supports a filter by country
:exploding_head:
Trying to understand the next actionable thing but it seems
dictionary.getByTerm()
already supports a filter by country 🤯
Interesting, but does it work though?
Because StreetComplete seems to be sending that countryOrSubdivisionCode
param in Things overlay, but the "Mail Drop Box" (amenity=post_box
) doesn't show in search results (https://github.com/streetcomplete/StreetComplete/issues/4916).
So either countryOrSubdivisionCode
in StreetComplete is null
, or getByTerm()
here doesn't work as advertised. It would need to be debugged.
Nothing on the API would need to be changed to accommodate this feature, correct.
The postbox feature is also in the dictionary. It is just not indexed (and the search uses exclusively the indices to search)
What I find interesting that while searching for postbox also fails in SCEE Things Overlay, SCEE also has long-press-to-Add-POI feature, and that one manages to find "Mail Drop Box" (amenity=post_box
) just fine!
However, tracking what it does differently is beyond my capabilities; but there seems to be some way (perhaps not using indexes, but I do not notice that search is any slower -- it is relatively recent phone [Samsung Galaxy S23+] though, so it may be it is just too fast to notice)?
Actually, it is indexed. I was wrong about the source of streetcomplete#5945 all along!
Also, it looks like finding country-specific features also is already working, all along! There was a small bug, but it should actually not matter.
So, I am now investigating where the real culprit lies.
closing as invalid
Currently, all (non-brand) features indexed globally. IIRC, thus, features that are country-specific can thus not be found by this library.
See https://github.com/streetcomplete/StreetComplete/issues/4916