sul-dlss / earthworks

Geospatial discovery application for Stanford University Libraries.
https://earthworks.stanford.edu
Other
18 stars 3 forks source link

Use more specific icons for layers where possible #1045

Open thatbudakguy opened 3 weeks ago

thatbudakguy commented 3 weeks ago

Note: this could be accomplished in GeoBlacklight, or drafted in Earthworks and then ported to GeoBlacklight later. See related issue https://github.com/geoblacklight/geoblacklight/issues/1041.

The problem

In GeoBlacklight v3, there was a simple single-valued field for tracking the "geometry type" of a layer that determined what icon to use. This helped distinguish between e.g. polygon data and point data:

Screenshot 2024-06-07 at 10 04 42 AM

In GeoBlacklight v4, there are two fields that describe the type of a layer, and both are multi-valued: the more general resource class and more specific resource type. Both have controlled vocabularies; note that resource type actually has two separate controlled vocabularies (one for maps and one for geo data).

The current implementation just uses the first value from resource class to decide what icon to use. This means all geo data is lumped into one "Datasets" category, so an index map appears no different from a raster:

Screenshot 2024-06-07 at 10 08 13 AM

Similarly, when looking at the relation box on collection pages, all of the members of the collection use a generic "leaf" icon instead of the one that indicates what data type they are:

Screenshot 2024-06-07 at 10 37 46 AM

Ideally, we could get some of the old behavior back, where things like polygon data and line data are distinguished.

Implementation ideas

Places to look