Skip to content

Commit 5561a70

Browse files
committed
Fix Geotag doclib action caused by missing GMaps dependency
git-svn-id: https://share-extras.googlecode.com/svn/trunk/Document Geographic Details@916 a3f5c567-fd0f-3a89-9b71-a290c5a5f590
1 parent 94253d4 commit 5561a70

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

web/extras/components/documentlibrary/geotag-action.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
function gmaps_init() {
2+
// Do nothing
3+
}
4+
15
/**
26
* Document library Geotag action
37
*
@@ -18,6 +22,14 @@
1822
var $html = Alfresco.util.encodeHTML,
1923
$combine = Alfresco.util.combinePaths;
2024

25+
// Async handler to bring in Google Maps scripts
26+
Event.onDOMReady(function geotag_gmapsInit() {
27+
var script = document.createElement("script");
28+
script.type = "text/javascript";
29+
script.src = "http://maps.google.com/maps/api/js?sensor=false&callback=gmaps_init";
30+
document.body.appendChild(script);
31+
});
32+
2133
/**
2234
* Geotag a document.
2335
*

0 commit comments

Comments
 (0)