|
DocumentGeographicDetails
Describes the Document Geographic Details component for Alfresco Share
Addon-Action, Addon-PageComponent, AlfrescoVersion-3.x, AlfrescoVersion-4.x IntroductionThis project provides an additional page component for the Document Details page to display a small map view for geotagged content items.
The page component will display automatically for content items which already have the Geographic aspect applied to them. For other items, a custom Document library action named Geotag is supplied, which can be enabled at install time.
The 4.x-compatible version also provides two other custom actions View in OpenStreetMap and View Location on Geohack, which complement the out-of-the-box Google Maps-based view.
The add-on has been developed to install on top of an existing Alfresco 3.4 or 4.x installation. It can work with version 3.3 if the cm:geographic aspect is added to the repository's content model - see Known Issues below. InstallationThe component is packaged as a single JAR file for easy installation into Alfresco Share. To install the component, simply drop the document-geographic-details.jar file into the tomcat/shared/lib folder within your Alfresco installation, and restart the application server. You might need to create this folder if it does not already exist. Custom Action Installation (Share 3.x, Optional)See README.txt for instructions on how to enable the Geotag custom action in the Document Library in 3.3 and 3.4. Custom Actions Installation (Share 4.x, Optional)The custom Geotag action is also supported on Alfresco 4.0, and is supplied with two other actions which allow you to choose OpenStreetMap or other map-based views. You can enable the actions on both the document details and document list pages by adding the following configuration to your share-config-custom.xml. <config evaluator="string-compare" condition="DocLibActions">
<actionGroups>
<actionGroup id="document-browse">
<action index="996" id="org_sharextras_document-view-osm" />
<action index="997" id="org_sharextras_document-view-geohack" />
<action index="998" id="org_sharextras_document-geotag" />
</actionGroup>
<actionGroup id="document-details">
<action index="996" id="org_sharextras_document-view-osm" />
<action index="997" id="org_sharextras_document-view-geohack" />
<action index="998" id="org_sharextras_document-geotag" />
</actionGroup>
</actionGroups>
</config>If you only wish to show some of the actions, or only on the document details or document list page, then you can simply remove the other items. Building from SourceCheck out the project if you have not already done so svn checkout http://share-extras.googlecode.com/svn/trunk/Document%20Geographic%20Details Change into the new directory cd "Document Geographic Details" An Ant build script is provided to build a JAR file containing the custom files, which can then be installed into the tomcat/shared/lib folder of your Alfresco installation. To build the JAR file, run the following command from the base project directory. ant clean dist-jar The command should build a JAR file named document-geographic-details.jar in the dist directory within your project, which you can then copy into the tomcat/shared/lib folder of your Alfresco installation. Alternatively, you can use the build script to hot deploy the JAR file directly into a local Tomcat instance for testing. You will need to use the hotcopy-tomcat-jar task and set the tomcat.home property in Ant. ant -Dtomcat.home=C:/Alfresco/tomcat clean dist-jar hotcopy-tomcat-jar After you have deployed the JAR file you will need to restart Tomcat to ensure it picks up the changes. Usage
Known IssuesIn order to work with version 3.3 of Alfresco, the cm:geographic aspect must be added to the file contentModel.xml in tomcat/webapps/alfresco/WEB-INF/classes/alfresco/model. Ensure you add it within the <aspects> element. <aspect name="cm:geographic">
<title>Geographic</title>
<properties>
<property name="cm:latitude">
<title>Latitude</title>
<type>d:double</type>
</property>
<property name="cm:longitude">
<title>Longitude</title>
<type>d:double</type>
</property>
</properties>
</aspect>
| |
Hi Will,
Nice addition to the share extras! Keep up the good work.
Silvion Moesan Senior ECM Consultant
Enabling Geotag Action in version 4.0 is slightly different:
need to define action in \tomcat\webapps\share\WEB-INF\classes\alfresco\share-documentlibrary-config.xml
I did it like this, but it was all shotgun-method guessing - please correct me if I'm wrong, redundant, etc:
<action type="javascript" id="onActionGeotag" permission="edit" label="actions.document.geotag"> <param name="function">onActionGeotag</param> </action>
And you MUST add this to the group actions for the menu item to show up where its supposed to:
<action index="360" id="onActionGeotag" />
@chopsshop88 - thanks for raising this. The base action config for 4.0 is actually already supplied in the 2.x JAR file, but you do need to add it to the actions menu as you mention. I've updated the installation procedure above with the full details.
Thanks for the update! Strange problem with older version and this one:
If I add the module with the module loader, the small meta data map appears as it should on the item details page. But this doesnt survive service restart.
Sounds like a really cool addon, but I have some issues when I try it. Alfresco 4.0. Built and added the jar, plus modified my share-config-custom per the directions above, but it doesn't work completely. When I look at an image that has the geographic aspect and values for lat/long, and I see the new actions as expected. View OSM works great, as does view geohack. The geotag action starts off right by popping up a map, but when I select a new location and click ok all I get is a popup 'Couldn't geotag <file>'. There's also no minimap shown on the document details page as expected. Not sure how to go about determining why the parts that aren't working are doing so.
Hi cpatchet, please could you raise those problems in the Issues section? You can put them all in one ticket if it helps. Just be sure to mention the exact version you are using (of Alfresco 4 and the addon), the template there has a space for you to put them.
Thanks Will, issue submitted (number 78). Appreciate the quick response.