You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -3,44 +3,192 @@ Geo Views add-on for Alfresco Share
3
3
4
4
Author: Will Abson
5
5
6
-
This project provides the following components which display geotagged content
7
-
items within the site in a map view:
6
+
This project provides the following components which display geotagged content items within map views and to modify the geographic information associated with stored items.
7
+
8
+
By default Google Maps is used to render map views, with support for [Leaflet](http://leafletjs.com/) included via additional Share modules (requires Alfresco 4.0 or greater).
9
+
10
+
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.
8
11
9
-
* Site Geotagged Content Dashlet
10
-
* Document Library 'Geographic' View
12
+
### Site Geotagged Content Dashlet
13
+
14
+
This dashlet displays site content on a configurable map view on the site dashboard in Alfresco 3.3 or greater.
Allows the user to select a _Geographic_ view within the site Document Library itself. The map displays content in a specific folder or matching any of Share's predefined filters, using the map view.
21
+
22
+
This view relies on the new [pluggable view capabilities](http://rgauss.com/2012/08/08/adding-document-library-views-to-alfresco-share/) introduced in Alfresco 4.2, and therefore will not function in older versions of Alfresco.
23
+
24
+
###Document Details page Map Component
25
+
26
+
The add-on adds an additional page component for the Document Details page to display a small map view for geotagged content items. Works in Alfresco 3.3 and greater.
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.
31
+
32
+
### _Geotag_ Document Library Action
33
+
34
+
Allows users to add Geographic information to items, or to modify existing Geographic location data, using a map view.
35
+
36
+

37
+
38
+
This action is provided in the 0.x version and the 2.x version, providing support for Alfresco 3.3/3.4 and 4.x, respectively.
39
+
40
+
The 2.x version of the add-on also provides two other custom actions View in _OpenStreetMap_ and _View Location on Geohack_, which complement Share's out-of-the-box Google Maps-based view by allowing you to choose [OpenStreetMap](http://www.openstreetmap.org/) or other map-based views.
41
+
42
+

11
43
12
44
Installation
13
45
------------
14
46
15
-
The dashlet has been developed to install on top of an existing Alfresco
16
-
3.3/3.4 or 4.x installation.
47
+
The add-on is packaged as a single JAR file for easy installation into Alfresco Share.
48
+
49
+
To install the dashlet, simply drop the `geo-views-<version>.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.
50
+
51
+
Configuration
52
+
-------------
53
+
54
+
After installing the JAR file, some additional steps are requires to add the customizations to Share.
55
+
56
+
### Site Geotagged Content Dashlet
57
+
58
+
No specific configuration is required to use the Google Maps-based view.
59
+
60
+
To use Leaflet in preference to Google Maps, enable the _Site Geotagged Content Dashlet (Leaflet)_ module in the Share [Module Deployment console](http://code.google.com/p/share-extras/wiki/ModuleDeployment), after Alfresco has started up.
61
+
62
+
### Document Library 'Geographic' View
63
+
64
+
In order to turn on the view you must enable the _Document List Geographic View_ module in the Share [Module Deployment console](http://code.google.com/p/share-extras/wiki/ModuleDeployment), after Alfresco has started up.
65
+
66
+
To use Leaflet in preference to Google Maps, enable the _Document List Geographic View (Leaflet)_ module in addition to this. You must ensure that this module appears after the first when you click _Apply Changes_.
67
+
68
+
###Document Details page Map Component
69
+
70
+
To add the map view to the Document Details screen you must enable the _Document Geographic Details Component_ module in the Share [Module Deployment console](http://code.google.com/p/share-extras/wiki/ModuleDeployment), after Alfresco has started up.
71
+
72
+
### Document Library Actions
73
+
74
+
This will enable the custom _Geotag_, _View in OpenStreetMap_ and _View in Geohack_ Document Library Actions in Share's document list page, and document details page.
75
+
76
+
#### Alfresco 4.1/4.2
77
+
78
+
All three actions are supported on Alfresco version 4.1 and greater.
79
+
80
+
The actions can be enabled in the Module Deployment Console, after Alfresco has started up. There is one module for each action.
81
+
82
+
_Note: This method automatically adds the `DobLibActions` configuration below to Share. If you wish to use a different configuration, you must apply this manually as for Alfresco 4.0 and modify as you require._
83
+
84
+
#### Alfresco 4.0
85
+
86
+
All three actions are supported on Alfresco 4.0.
87
+
88
+
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`.
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.
107
+
108
+
#### Alfresco 3.3/3.4
109
+
110
+
Only the _Geotag_ action is supported on Alfresco 3.3/3.4.
111
+
112
+
To enable the action, copy the web script configuration file `WEB-INF/classes/alfresco/site-webscripts/org/alfresco/components/documentlibrary/documentlist.get.config.xml` from the Share webapp into the directory
113
+
`alfresco/web-extension/site-webscripts/org/alfresco/components/documentlibrary` in Tomcat’s `shared/classes` to override it. You should see a section `<actionSet id="document">` which defines all the actions shown for a normal document in the document list view.
114
+
115
+
To add the _Geotag_ action to this list, add the following line just before the `</actionset>` element for that block.
If you also want the action to show up in the document details view, you need to copy the file
120
+
`WEB-INF/classes/alfresco/site-webscripts/org/alfresco/components/document-details/document-actions.get.config.xml` into `alfresco/web-extension/site-webscripts/org/alfresco/components/document-details` in `shared/classes`, and add the extra `<action>` definition in the same way.
121
+
122
+
Lastly, you need to ensure that the client-side JS and CSS assets get pulled into the UI as unfortunately the config files do not allow us to specify these dependencies.
123
+
124
+
To do this, you must override the file `WEB-INF/classes/alfresco/site-webscripts/org/alfresco/components/documentlibrary/actions-common.get.head.ftl`. Copy this into the directory `alfresco/web-extension/site-webscripts/org/alfresco/components/documentlibrary` in `shared/classes` and add the following lines at the bottom of the file.
125
+
126
+
<#-- Google Maps scripts -->
127
+
<#-- optional google map key @script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false&key=your domain's google maps key" -->
Once you have made these changes you will need to restart Tomcat so that the configuration and your classpath resources in the JAR file are picked up.
17
134
18
-
An Ant build script is provided to build a JAR file containing the
19
-
custom files, which can then be installed into the 'tomcat/shared/lib' folder
20
-
of your Alfresco installation.
135
+
_Note: If you want the action to appear in the repository browsing pages or in Web Quick Start or Records Management sites, you will also need to update the corresponding `.config.xml` and `.head.ftl` files for those page components._
136
+
137
+
Building from Source
138
+
--------------------
21
139
22
-
To build the JAR file, run the following command from the base project
23
-
directory.
140
+
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.
141
+
142
+
To build the JAR file, run Ant from the base project directory.
24
143
25
-
ant clean dist-jar
144
+
ant dist-jar
26
145
27
-
The command should build a JAR file named `geo-views-<version>.jar`
28
-
in the 'dist' directory within your project.
146
+
The command should build a JAR file named `geo-views-<version>.jar` in the `build/dist` directory within your project.
29
147
30
-
To deploy the dashlet files into a local Tomcat instance for testing, you can
31
-
use the hotcopy-tomcat-jar task. You will need to set the tomcat.home
32
-
property in Ant.
148
+
To deploy the files into a local Tomcat instance for testing, you can use the` hotcopy-tomcat-jar` task. You will need to set the `tomcat.home` property in Ant.
33
149
34
-
ant -Dtomcat.home=C:/Alfresco/tomcat clean hotcopy-tomcat-jar
150
+
ant -Dtomcat.home=C:/Alfresco/tomcat hotcopy-tomcat-jar
35
151
36
-
Once you have run this you will need to restart Tomcat so that the classpath
37
-
resources in the JAR file are picked up.
152
+
After you have deployed the JAR file you will need to restart Tomcat to ensure it picks up the changes.
38
153
39
154
Usage
40
155
-----
41
156
42
157
### Using the Dashlet
43
158
44
-
Log in to Alfresco Share and navigate to a site dashboard. Click the
45
-
Customize Dashboard button to edit the contents of the dashboard and drag
46
-
the dashlet into one of the columns from the list of dashlets.
159
+
1. Log in to Alfresco Share and navigate to a site dashboard.
160
+
2. Click the _Customize Dashboard_ button to edit the contents of the dashboard and drag the dashlet into one of the columns from the list of dashlets.
161
+
162
+
### Using the Document Library Geographic View
163
+
164
+
Navigate to the doucment library of any site and select the _Geographic_ view from the list on the top right-hand-side of the document list.
165
+
166
+
### Using the Document Details map view
167
+
168
+
1. Log in to Alfresco Share and navigate to a site containing geotagged content in the Document Library. Any content items with the Geographic aspect applied and Latitude/Longitude properties set can be used, but geotagged photos from camera phones will have this information populated automatically.
169
+
2. Locate one of the geotagged content item(s) and click into the _Document Details_ page.
170
+
3. Scroll down the page to see the _Geographic Information_ section below the metadata list. Note that this section will only be shown on the page if latitude and longitude values are available and the Geographic aspect has been applied.
171
+
172
+
### Using the Geotag Action
173
+
174
+
To geotag other content items or to update the geographic information on already-tagged items, click the _Geotag_ action on the document list or document details pages. You must have edit permissions on the file and have enabled the custom action at installation time (see _[Configuration](#configuration)_, above).
175
+
176
+
177
+
Known Issues
178
+
------------
179
+
180
+
In 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.
0 commit comments