-
Story
-
Resolution: Done
-
Major
-
None
-
None
-
2019 Week 14-16
-
3
-
NEW
-
NEW
I want the geosearch UI feature to always automatically present only results that are relevant to the area that backend has loaded. Ideally there should be no results that are outside of the loaded data (i.e. whenever I choose a result, it should be added successfully).
The first implementation will use the bounding box. Obviously some results may be outside a loaded country even though they fit into its bounding box (countries are usually not rectangles). But this is easier to implement and will work in every situation, even when using an area covering multiple countries or just a country sub-region.
Technically it's possible to extract country codes from OSM PBF file but after doing some research I've found it's not simple, so this can be implemented later (if it's needed at all). Filtering results by country codes may give more relevant results for larger areas but, on the other hand, would include irrelevant data when working with sub-regions.
We also might need to offer some level of configuration on top of auto-detection. For example, if I want more relevant results than bounding box gives, I can use something like app.region.countrycodes=CZ,SK.