Closed fgravin closed 8 years ago
For ProVeloBern we also have a simple implementation using Typeahead for this: https://github.com/camptocamp/provelobern_bicyclerouteplanner/blob/8bd0c7c/app/provelobern/static/js/search.js#L97-L103 https://github.com/camptocamp/provelobern_bicyclerouteplanner/blob/8bd0c7c/app/provelobern/static/js/search.js#L155-L172
Why duplicate things?
duplicated with: https://github.com/camptocamp/ngeo/issues/696
Questions
Do we support degree minute coord system ? EBO: No
Features
Remarque: With the projection system EPSG:21781, EPSG:2056, EPSG:4326 and by inversion the coordinates we never had a coverage in the Switzerland :-)
Some info on the coordinate systems (attention: don't implement these hard values. They are just for information):
Swisstopo has done something like this, see the link in the section below.
Layout
To be defined (with and without groups...)
External Resources
no
Architecture
We need a service that compute a position from the search pattern. The search query is tested through regexp to determine if it is a degree minute or standard coordinates. The service should take a config with a list of supported projections. For all this projections, we need to transform the search coordinate to the map projection and see if is is contained in the current extent. If not, we invert, if not we check next projection. The order of the projections in the config set the priority of the detection.
When we find a position that is in the extent, we return it.
We could externalize the "multi projection" recognition and conversion in another service (in
ngeo
)because it will be also used by the permalink and the API.Configuration
Implementation Examples
Exit-criteria
The following should work in the search field:
Documents