aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--IkiWiki/Plugin/osm.pm11
1 files changed, 10 insertions, 1 deletions
diff --git a/IkiWiki/Plugin/osm.pm b/IkiWiki/Plugin/osm.pm
index e96a12837..6ba2524d8 100644
--- a/IkiWiki/Plugin/osm.pm
+++ b/IkiWiki/Plugin/osm.pm
@@ -60,6 +60,14 @@ sub getsetup () {
safe => 0,
rebuild => 1,
},
+ osm_openlayers_url => {
+ type => "string",
+ example => "http://www.openlayers.org/api/OpenLayers.js",
+ description => "Url for the OpenLayers.js file",
+ safe => 0,
+ rebuild => 1,
+ },
+
}
sub register_rendered_files {
@@ -519,7 +527,8 @@ sub cgi($) {
sub embed_map_code(;$) {
my $page=shift;
- return '<script src="http://www.openlayers.org/api/OpenLayers.js" type="text/javascript" charset="utf-8"></script>'.
+ my $olurl = $config{osm_openlayers_url} || "http://www.openlayers.org/api/OpenLayers.js";
+ return '<script src="'.$olurl.'" type="text/javascript" charset="utf-8"></script>'.
'<script src="'.urlto("ikiwiki/osm.js", $page).
'" type="text/javascript" charset="utf-8"></script>'."\n";
}