Problem/Motivation
Hi all,
For a fairly large location based website, I'm facing some serious UX issues. It has proximity based views on the most important landing pages, taxonomy pages, and nodes. One big problem is that there is no way to remember the user's location. So every page loads twice as the location is fetched for each page load repeatedly.
The biggest complaint from users is for catalog pages, where the page reload usually happens just as people are trying to filter the results. It is also annoying to users that they've scrolled down a list of posts, and then the page load occurs and takes them back up the page.
Another issue is that no IP based sorting is available, that would be great to have as a fallback for when people don't have GPS on their device (Desktops, etc), or when they don't want to grant location access. That's especially the case for new users not yet familiar with the platform.
These are basically the features
https://www.drupal.org/project/ip_geoloc →
provided back in the day. Unfortunately, development for D8, 9, 10, and up seems to have stalled (#[1938750]).
It would be really great if the Geofield module could implement the settings from that module:
- Remembering user location once geo-located
- Setting the URLs where location should be determined
- Fallback to smart IP (
#1901750: Integrate Smart IP with Geofield's Views proximity handlers →
)
Steps to reproduce
- Create 2 pages with proximity based views that sort based on the Proximity Form Field set to "Client location" with "Auto-submit form" checked and "Hide coordinates form" set. Add some exposed filters to the second view on the second page.
- Navigate to the first page, grant location access. The page will reload.
- Navigate to the second page, change some of the filters and the page reload will happen again, interrupting and resetting your filter options.
- View the site on a device that is not GPS enabled and see how the proximity based views are no longer relevant to the user because there is no IP fallback.
Proposed resolution
- Store the user's location in a session variable just like the ip_geoloc module used to do, and make it available to views for sorting.
- Add SmartIP or something similar as a fallback option in case user location can't be determined via GPS.
Remaining tasks
User interface changes
API changes
Data model changes