Enabling a map view
In greenstone 3, if your documents or images have GPS metadata then you can add in a Google maps feature which will plot the documents on the map.
Please see the Image Collection with GPS metadata tutorial for details.
There are a few configuration settings missing from the tutorial (as at July 2017). Here is a summary of steps to follow:
- Add GPS metadata manually to documents, or use EmbeddedMetadataPlugin to extract it automatically from images.
- Add indexes on ex.Latitude, ex.Longitude, ex.LatShort, and ex.LngShort
- Add
<gsf:option name="mapEnabled" value="true" />
to the format statements for search, browse and display.
- Add raw to the list for the searchTypes format feature.
- Rebuild the collection.
Older versions of Greenstone 3 may have an out-of-date code for accessing the google maps api. Check the file web/interfaces/default/transform/layouts/header.xsl, and look for
<script src="http://maps.googleapis.com/maps/api/js?
If it looks like
<script src="http://maps.googleapis.com/maps/api/js?sensor=false" type="text/javascript"><xsl:text> </xsl:text></script>
then change it to
<script src="http://maps.googleapis.com/maps/api/js?key=AIzaSyCofVTps3xHfMvIcTMHqYMMxe3xXfkAxnI" type="text/javascript"><xsl:text> </xsl:text></script>
Note this uses a key owned by the Greenstone project. There is a limit to how many requests any one key can have per day, so it may pay to set up your own key, see https://developers.google.com/maps/documentation/javascript/get-api-key.