Visualising Geotagged Content with Google Maps

Showing results for 
Search instead for 
Did you mean: 

Visualising Geotagged Content with Google Maps

Active Member II
0 6 5,950
Following Steve Reiner's Twitter post last week, I was inspired over the weekend to add a similar Google Maps-based dashlet to share-extras, to show the locations of geotagged content items on a map view.

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']Latitude and Longitude on the Document Details page[/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']Firebug 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.