Since the repository has full support for extracting geographic data using Tika in version 3.4, all I needed to do to assemble some test content was upload a few photos taken on my phone into the site Document Library.
If you look at the Document Details page of a geotagged photo, you'll see that this displays a latitude and longitude value at the end of the item's properties list. These are part of a new aspect named Geographic.
[caption id='attachment_256' align='alignnone' width='145' caption='Latitude and Longitude'][/caption]
Using Firebug's Net console, I noticed that the JSON data for the document list view makes these values available on a new geographic property placed on each list item.
[caption id='attachment_258' align='alignnone' width='397' caption='Firebug's Net Console'][/caption]
So to keep things simple the initial version of the dashlet simply re-used the doclist web script to grab a list of all content items in the root of the document library space, but the final version now on share-extras comes bundled with a dedicated webscript to list all items in the site that have the Geographic aspect applied.
Using this data, the dashlet displays a marker for each geotagged item, auto-centering itself on the centre point of all the items.
Clicking on a marker takes you to the Document Details page for that item. In the next update I'll look at displaying a snippet of information for the item, which the Google Maps API makes pretty easy.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.