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.
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.
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.
Hi, this is great…
I’m just working on the integration of Exhibit widget (http://www.simile-widgets.org/exhibit/) for a faceted navigation of contents in a dashlet…
Do you have any advice for me about this? The main problem, perhaps, in my approach is dealing with increasing amount of contents in repository, as I need ALL items at once, as json, so the lucene query may take a while…
Hi Fancesco, sounds like an interesting project. At higher zoom levels you can use Lucene to constrain the search results within only the range of latitudes and longitudes that the map covers. The Geotagged Content dashlet doesn’t yet do this but I will probably add this in the next version, as photos tend to be taken within the same geographic areas.
If your map is showing the whole world then obviously you can’t constrain by geography, but you can still limit the number of results that Lucene returns. When a user zooms in you can then re-query the server, adding the geographic constraints, to get more results in that area.
Pingback: RIA for Enterprise 3.0 » Blog Archive » Alfresco OpenCalais Integration Share UI
Pingback: Will Abson on Alfresco » Blog Archive » New Additions to Share Extras
Dear Mr. Abson,
I am currently using your dashlet on a Alfresco 4.0 Community Share site.
The installation went well and the map is correctly shown. However, no content is shown on the map.
As I can see the content on Google Maps when I go onto its details, I suppose the problem doesn’t come from the geotag metadata.
Do you have any idea why the dashlet doesn’t work ? Is it maybe because I use custom content types ? Or because your dashlet can’t be used on the Community version ?
Hi Mathias, please open an issue on the Share Extras project to report this