From: Genevieve Date: Fri, 3 Aug 2012 01:10:42 +0000 (-0400) Subject: OSM Plugin: Possibility to configure where the OpenLayers.js file is X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=409c4e48f983d10aceb6321148d7f440d17eb28f;p=ikiwiki.git OSM Plugin: Possibility to configure where the OpenLayers.js file is (cherry picked from commit 6f684cd412e6d93f943c1fa5d8dac91caa138be0) --- 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"; }