We have intensely worked on the performance of OC Maps. And we have built a module that allows to copy location data from OpenStreetMap as well as to write updated information to OpenStreetMap. And we are introducing an new generic field.
Faster OpenCulturas Maps
With many locations and/or many event dates, the OC Maps module introduced with version 2.1 made users wait for filter results pretty long. We gave this feature a boost: the results are now being loaded in chunks and a default time period can be pre-set in the calendar map.
Please note: Manual views changes are required! We did not want to force-update the views because you may have made useful customizations. Follow one of the How-to lists below.
What has changed?
- Change the way the data is loaded:
Previously, the map would load all results at once. Now, we’ve implemented a method to load data in smaller chunks, fetching a specific number of results at a time. This means that map markers and results will load dynamically as users interact with the map, improving responsiveness. - Abort previous load upon user interaction:
If a user zooms or pans the map, any ongoing data requests will be canceled. For example, zooming into Göttingen will stop previous requests and only load data relevant to Göttingen from that point onwards. - Loading spinner position:
The loading spinner has been moved from an overlay on the map to a location next to the results counter, stepping out of the way of the dynamically loading markers. - Make all requests to the rest export anonymous:
To address the issue that logged-in users were not receiving cached results, session cookies are no longer sent with the requests. This change ensures that all users, logged in or not, benefit from cached data. Unfortunately this comes at a price: no matter if your role entitles you to see any unpublished nodes, you will not see those reflected in the map results or map markers. - Development mode option in module settings:
On a stage server you would typically activate basic auth (htpassword). In this scenario please enable the development mode, otherwise the chunked loading would deliver no results. - View pager settings:
To work as designed, the views OC Map: Locations and OC Map Dates get an update, changing the pager settings to Paged output, mini pager.
Using the module for the first time
Read the article about how to use OpenCulturas map.
Optional modifications the given views
Responding to our community's ideas, you may change the following with administrator privileges:
- Edit view OC Map: Dates (/admin/structure/views/view/oc_map_dates)
- Optional: add exposed filter for event title (Title with Relationship field_event_description: Content)
- Optional: when handling a huge number of event dates, add relative values for the start/end date exposed filters (e. g. start date today and end date + 4 weeks