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
Exchange location data with OpenStreetMap
Thanks to a grant from Prototype Fund, OpenCulturas 2.4 ships with a new experimental module: OpenCulturas OpenStreetMap.
When enabled and appropriately configured, you get two benefits:
- Allow the location owners on your platform (or those who feel responsible for a location's informational quality) to submit updates to OpenStreetMap. No knowledge about how to contribute required. All you or your privileged users have to do is to make step-by-step decisions whether contact data, opening hours, and wheelchair accessibility information should be updated. Default permissions follow the workflow permission for publishing a location.
- Conveniently import location data from OpenStreetMap for a newly created location.
The required setup steps are described on a dedicated help page, including a development mode for own testings. Once installed, please follow the module's help link and configure link.
Read more about Accidental Contributions on our project page.
Alternative title field
Two projects are gathering insights with import APIs. One major issue is the identification of duplicates (we are planning to publish a dedicated magazine article soon). We observed that locations often have different names (e. g. "St. Martin Church", "Catholic Church St. Martin", Martin's Church").
Talking about adding alternative names as a means to detect duplicates of a given location, we thought that such a field would be useful for on-site searches as well. Therefore the new OpenCulturas version introduces the field alternative_title
for locations and profiles.
Please note: Check your search index status (/admin/config/search/search-api/index/content) with an admin account. If the number of index items is close to 0, click "Queue all items for reindexing" and then "Index now".
Branch calender widget update
Did you know that you can allow your partner's websites to use a filtered subset of your event calendar?
With this update it is even possible to configure several branch calendars for a target domain. And we have enhanced the iframe CSS so that calendars look well-formed in narrow iframes, too.