Tuesday, March 8, 2011

Mapping Part 2: Context

The new American Numismatic Society collection interface will enable users to navigate from records of coins to other objects related by various attributes (issuer, deity, material, etc.) via hypertext links, which redirect the user to the search results page for that particular query. This is one of the features that made the University of Virginia Art Museum Numismatic Collection such a versatile site when it went live in early 2008. Given our ability to map query results in OpenLayers with a Solr-to-KML transformer, we wanted to take the mapping up a notch by visualizing relationships geographically that had only been represented textually in other Numishare sites.

A small map is embedded in a jQuery tab. This map has several layers, each representing facets, that can be turned off and on as the user requires.

Each mint or cluster of mints on the map can be clicked to display a popup that displays the mint name(s) and available facets at that location. The list of facets is represented by a set of checkboxes, and a link within the popup opens a search results page with the selected facets at that mint. The task of displaying checkboxes within the popup is harder than it seems. OpenLayers does not support selecting multiple features on more than one layer at a time, so a handful of Solr queries must be executed upon clicking the feature.

  1. The mint names of the feature are gathered.
  2. For each visible layer, Solr is queried to see if there are any search results for that facet located at that mint (e.g., is there at least 1 result for Nike at Tyre, Sidon, or Berytus?)
  3. If so, return a checkbox via Ajax with some prepopulated value.
  4. When the user clicks on the "View" link, javascript is fired off to assemble the values of the checkboxes into a proper Solr query and opens the search results in a new browser window.

Using the map interface from the object page enables us to formulate far more complex queries than the linking approach does. Once the user arrives at the search results, he or she can easily adjust the query by adding/removing facets or sorting the results by a wide variety of fields. There are currently several alternate data delivery options offered through the linked icons on the top left of the screen: an Atom feed of the query (useful for scholars who may only want to subscribe to Roman Republican coins, for example) and a KML representation of the query that can be loaded by Google Earth. These are just some of many new features the new ANS collection interface will exhibit when it launches within the next few weeks.