I am working with a scholar who is primarily describing authors and their works. The scholar wants to display a map with the authors’ birthplaces and a separate map with the authors’ primary place of residence. This doesn’t appear to be part of the capabilities of the Mapping module, but is there another way to accomplish this that I’m not seeing?
You could represent an author’s birthplace and primary place of residence as separate items. For example, an author’s birthplace could be a dctype:Location
item that links to the author via schema:birthPlace
; and an author’s primary place of residence could be a dctype:Location
item that links to the author via schema:homeLocation
. Here’s another way of looking at it:
<Author item>
schema:birthPlace
<dctype:Location item>
<Author item>
schema:homeLocation
<dctype:Location item>
(Here I’m using the schema.org vocabulary, which you would need to import.)
That sets up the linkages between the authors and their locations. You’ll also need to identify the location items in a way that the Mapping blocks can distinguish them. I’d create a “Author Birthplaces” item set and a “Author Residences” item set and assign the location items to them. Then, you can add two “Map by query” blocks to a page and select those item sets as the pool of items to be geolocated.
Thanks @jimsafley, that approach sounds really promising. Would the pins in the maps then represent the places, or would there be a way for readers to click on the pins and see all of the authors associated with that location?
Would the pins in the maps then represent the places, or would there be a way for readers to click on the pins and see all of the authors associated with that location?
Both. Each pin would represent a location item. Users would click on the pin and then view the location item itself, where they would see the authors who were born or reside in that location.
Thanks for helping me think through this, @jimsafley. I talked this approach over with the researcher and she thinks it would involve too many clicks to get to the targeted information from the map. It may be that we’ll need to look into another mapping solution for her, but I did want to double-check to see if you had any plans to implement a feature in the mapping module that could populate the map from geocoordinate values from a selection of items–something similar to the way the datavisualization module can do a count of items with property values.
If I understand you correctly, we have no such plans. Though it is an interesting idea. Perhaps it’s worthwhile for you to elaborate on how you envision the feature to work? Do you mean a page block where the page builder selects a pool of items and a property that contains geographical coordinates?
Yeah–that is precisely what I had in mind. It would probably need all of the fields from the Map by Query block, a property selector, and a selector to indicate the format for the coordinates. Then, these wouldn’t be strictly necessary, but it would be useful to include an option to “Use item default image as marker image?” and an option to “Use item name as marker label?”. Or perhaps for the optional marker label there would be a property selector to “Use property value as marker label”.