Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search box UI issues after geocoding #561

Closed
birbilis opened this issue Feb 4, 2021 · 9 comments
Closed

Search box UI issues after geocoding #561

birbilis opened this issue Feb 4, 2021 · 9 comments

Comments

@birbilis
Copy link
Contributor

birbilis commented Feb 4, 2021

There are some UI issues with Search box control and reverse geocoding. Trying with SearchNominatim.

  1. After reverse geocoding search, if one picks a location the searchbox control closes and they don't get to see the title of the location they have picked till they open search box again to see it as top entry in history. Should have an AutocloseAfterReverseGeocoding defaulting to false I think. An AutocloseAfterGeocoding defaulting to true would also be useful

  2. If they had searched for some address before, then the searchbox will show those results everytime they reopen the searchbox, even if they had done reverse geocoding search (see steps described for issue 1). I believe reverse geocoding search should clear the search box. There seems to be a commented out "this.setInput('', true);" at SearchNominatime line 112:

    //this.setInput('', true);

not sure if it should be done before this._handleSelect(resp, true); though - ideally the reverse result should also show in the input, not just in the history so that you can edit/finetune the address and search forward this time

@birbilis
Copy link
Contributor Author

birbilis commented Feb 4, 2021

btw, could have option after autocompleting the inputbox from reverse geocoding to do an automatic forward search to suggest other similar addresses. But I'd prefer the default to be to not do it. That is to just complete the inputbox with the found address to edit it and show the search history at the dropdown. User can then just press enter to search for that address

@Viglino
Copy link
Owner

Viglino commented Feb 4, 2021

I'll try to see what can be done...

@birbilis
Copy link
Contributor Author

btw, it would also be nice to have an option to have the searchbox open from the start (apart from the one that would control whether it autocloses). Don't remember if it had such

Viglino added a commit that referenced this issue Feb 17, 2021
@Viglino
Copy link
Owner

Viglino commented Feb 17, 2021

Hello
The search box open up filled with the response after reverse geocoding to lets you change it.
I've also added a collapsed option to open the search box on start and a collapse() method to show/hide the search box programmatically.

@birbilis
Copy link
Contributor Author

Is this released?
I was using https://cdn.jsdelivr.net/gh/Viglino/ol-ext@3.1.17/dist/ol-ext.min.js but I don't see a 3.1.18 available there yet, not sure how often they grab the new versions if that is done automatically

btw, I noticed that 3.17 says 3.16 in its comments, 3.16 says 3.15 and so one, but 3.12 says 3.12 ok in its header whereas 3.13 also says 3.12. Not sure if it is that they grab the wrong versions or that you had forgotten to change the version in the header in some releases (assuming that is not an autogenerated thing from jsdelivr.net)

@birbilis
Copy link
Contributor Author

Tried it at the examples page with Nominatim and seems to work fine

@Viglino
Copy link
Owner

Viglino commented Feb 22, 2021

Not yet released. I'll try to publish asap...

@Viglino
Copy link
Owner

Viglino commented Feb 22, 2021

3.1.18 is on the rails.

@birbilis
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants