dspace-angular
dspace-angular copied to clipboard
Geospatial maps for item pages, search, browse
References
- Requires DSpace/DSpace#9918
Description
This pull request is introduced as part of a wider contribution (GND authority and external data) but is a standalone feature which has a wide application, so is opened as a separate PR.
It allows maps to be drawn on item pages, a new geo-based search results view mode, and a 'browse by geolocation' browse map.
Full usage and technical documentation of this new feature is at https://github.com/kshepherd/dspace-geospatial-maps-doc/blob/main/README.md
Instructions for Reviewers
List of changes in this PR:
- New base and item field components (example usage commented out in untyped item and publication component templates) for drawing maps from metadata values or other input
- New configuration properties to support this feature
- A few new i18n keys
- Marker assets for leaflet maps
To prepare test data, populate some item metadata with dcterms.spatial WKT point values (as per documentation).
To test item page maps, try out the item page field components that are commented out in untyped-item and publication templates. This can be tested without the backend PR.
To test the search results map, enable it in angular config and look for a new 'map' view mode beside the list and grid view mode icons. This can be tested without the backend PR, though I recommend applying it and reindexing so you can try out the "has geospatial metadata" sidebar facet.
To test the browse-by map, make sure to apply the backend PR (note- this requires the solr search core to be recreated and reindexed due to a new schema field, if you want to use the "has geospatial metadata" filter) and make sure you have the documented search configuration, filters and facets applied, then do a full-reindex and enable the browse map in angular config. It should appear in the browse menu and clicking markers should open a new search filtered by that point.
Unit tests are written for all new components.
Checklist
- [x] My PR is created against the
mainbranch of code (unless it is a backport or is fixing an issue specific to an older branch). - [ ] My PR is small in size (e.g. less than 1,000 lines of code, not including comments & specs/tests), or I have provided reasons as to why that's not possible.
- [x] My PR passes ESLint validation using
npm run lint - [x] My PR doesn't introduce circular dependencies (verified via
npm run check-circ-deps) - [x] My PR includes TypeDoc comments for all new (or modified) public methods and classes. It also includes TypeDoc for large or complex private methods.
- [x] My PR passes all specs/tests and includes new/updated specs or tests based on the Code Testing Guide.
- [ ] My PR aligns with Accessibility guidelines if it makes changes to the user interface.
- [x] My PR uses i18n (internationalization) keys instead of hardcoded English text, to allow for translations.
- [x] My PR includes details on how to test it. I've provided clear instructions to reviewers on how to successfully test this fix or feature.
- [x] If my PR includes new libraries/dependencies (in
package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation. - [x] If my PR includes new features or configurations, I've provided basic technical documentation in the PR itself.
- [ ] If my PR fixes an issue ticket, I've linked them together.