This repository has been archived by the owner on Dec 4, 2018. It is now read-only.
osmscout: list nearby types fetched from the server #40
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.
This is not as clean as I would like it, but maybe you have suggestion on how to improve it.
This PR incorporates list of geotag aliases when using OSM Scout Server as a provider for nearby search. On every start of nearby page, when using OSM Scout, a list of current aliases is fetched from the server and used instead of the history when specifying nearby type. In practice, on my device, it works fast and I don't even recognize that something is pulled.
Few not so clean things:
The types list, as coming from the server, is not sorted. This I will change ASAP on the server side - its only one sorting while it is running.
We could also consider pulling the list once only. But, the list can, in theory, change when the user will add/remove languages used for address parsing. Namely, all languages listed in the parser, have the aliases represented in addition to the locale settings.
Maybe there is something else I am missing, let me know then.