terriajs
terriajs copied to clipboard
Configurable search providers from config
What this PR does
Fixes #5141 Requires https://github.com/TerriaJS/TerriaMap/pull/515
After investigation as the best option appears to utilize the existing model system for SearchProviders.
- wrote proposal as architecture decision record
- added SearchProviderMixin to connect searchProviders with a model system
- ported existing search providers to the proposed model
- added defaults to BingMapsSearchProviders and AustralianGazetteer for testing purposes.
Testing
Default SearchProviders are BingMaps and AustralianGazetteer, need to apply registerSearchProviders and comment out reference to BingMapsSearchProviderViewModel.
Pending
- [x] Make everything support i18next code and load correct names in GUI
- [x] Tests
- [x] Documentation
- [x] Create TerriaMap PR
Future work
- Introduce server-side WFS SearchProvider which will perform a search using terriajs-server and return the results.
Checklist
- [x] There are unit tests to verify my changes are correct or unit tests aren't applicable (if so, write quick reason why unit tests don't exist)
- [ ] I've updated CHANGES.md with what I changed.
This is ready for review, if anyone has time to check. p.s. Sorry, it turned out to be a monster PR.
Hi @steve9164, just to check is this still interesting for Terria team to rebase the changes when I am free?
Hi @nf-s I have synced the code with the latest main and it is ready for review. p.s. Would you like me to completely rebase and squash the code in a single commit to avoid polluting history with 2+ years old commits?
Hi @zoran995 Thanks so much! A rebase would be great. We don't think squash is required - but whatever you prefer!
We will try to review it in the next few weeks.
Thanks again 🙂