-
Notifications
You must be signed in to change notification settings - Fork 3
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
Re-order default list by location #261
Comments
Deployed to staging. Reliability seems to depend on different aspects like OS, browser, network, HTTPS.
Results should be sorted by distance to current location. Errors should be logged to the console. Location data is stored in the session, so restart browser for a clean test. |
I get errors in the console ("PositionError {code: 2, message: "Network location provider at 'https://www.googleapis.com/' : Returned error code 403."}"). I thought that the problem might be not being logged into google. But logging in didn't change anything. This problem has been occuring for some years in different browsers as a quick Google search suggests. There are other options to retrieve the position, see e.g. http://stackoverflow.com/a/32338735. |
When we have this problem sorted out, I would be happy if the map could reflect the currently shown – not returned – search results so that it zooms in to show the 20 institutions nearest to the searcher. |
If browser geolocation API returned no position
Deployed to staging: http://test.lobid.org/organisations The free So with general HTTPS redirects (see #263), this fallback would never be used. |
I am not yet satisfied with this. It is a bit confusing that the facets refer to the result list as a whole while the small map view doesn't. A solution might be implemented by a map zoom on the viewers position, loading only the organisations to be seen inside this part of the map and loading the other places in the background while the user can already interact with the page. Thinking a bit more about it, here is a proposal for a different approach:
IMO, this approach has at least two advantages:
I can not really see any disadvantages besides the fact, that the map may still be loading when people switch the tabs. For speeding up loading of the map, @literarymachine recommended gzip compression, see hbz/oerworldmap@a5634d1. |
This is a major change in the UI that brings up different issues (where does the current starting page content go, page structure would change, the map would become totally different in size etc.), so this should be a separate issue, and we'll have to see if we can build a good solution until Thursday. For this issue, the question then is: do we deploy this with all markers or for the current page only? About the compression: the data transfer is not the issue, it's the client side rendering of all the pins. |
Will deploy a variant later that loads the pins for the current page first, and the others in the background. |
Initially load pins for current page only, load remaining pins in the background, keep map zoomed in. Deployed to staging, see: http://test.lobid.org/organisations |
Tweaked behvior on staging: load not only pins for the current page initially, but up to the current page. This avoids initially disappeared pins when paging throught the results. |
If browser geolocation API returned no position
IP based position can be far off (depending on network setup), so we want top give users a way to disable sorting based on it.
Loading https://test.lobid.org/organisations/search still takes ~2s which is too long IMO. Nonetheless, the sorting is implemented and it loads fastert than now on production. Thus, +1. |
Currently, people are quite confused by the order of the result list on http://lobid.org/organisations/search. It would be great if people were asked for their location and the results were sorted with nearby organisations first.
The text was updated successfully, but these errors were encountered: