X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/d5b2dfd0e4fa3416f8396bb07f35c365e056648b..05decdadcba70e6304375987315d2f5dd00df98a:/IkiWiki/Plugin/osm.pm diff --git a/IkiWiki/Plugin/osm.pm b/IkiWiki/Plugin/osm.pm index 764767525..f570f4032 100644 --- a/IkiWiki/Plugin/osm.pm +++ b/IkiWiki/Plugin/osm.pm @@ -67,7 +67,20 @@ sub getsetup () { safe => 0, rebuild => 1, }, - + osm_layers => { + type => "string", + example => { 'OSM', 'GoogleSatellite' }, + description => "Layers to use in the map. Can be either the 'OSM' string or a type option for Google maps (GoogleNormal, GoogleSatellite, GoogleHybrid or GooglePhysical). It can also be an arbitrary URL in a syntax acceptable for OpenLayers.Layer.OSM.url parameter.", + safe => 0, + rebuild => 1, + }, + osm_google_apikey => { + type => "string", + example => "", + description => "Google maps API key, Google layer not used if missing, see https://code.google.com/apis/console/ to get an API key", + safe => 1, + rebuild => 1, + }, } sub register_rendered_files { @@ -137,6 +150,7 @@ sub preprocess { lat => $lat, lon => $lon, href => $href, + google_apikey => $config{'osm_google_apikey'}, }; return "
"; } @@ -520,6 +534,7 @@ sub cgi($) { zoom => "urlParams['zoom']", fullscreen => 1, editable => 1, + google_apikey => $config{'osm_google_apikey'}, ); print ""; print "