From 409c4e48f983d10aceb6321148d7f440d17eb28f Mon Sep 17 00:00:00 2001 From: Genevieve Date: Thu, 2 Aug 2012 21:10:42 -0400 Subject: [PATCH 1/1] OSM Plugin: Possibility to configure where the OpenLayers.js file is (cherry picked from commit 6f684cd412e6d93f943c1fa5d8dac91caa138be0) --- IkiWiki/Plugin/osm.pm | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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 ''. + my $olurl = $config{osm_openlayers_url} || "http://www.openlayers.org/api/OpenLayers.js"; + return ''. ''."\n"; } -- 2.45.0