aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
authorAntoine Beaupré <anarcat@koumbit.org>2012-08-25 08:53:30 -0400
committerAntoine Beaupré <anarcat@koumbit.org>2012-08-25 08:53:33 -0400
commit636e04a13a96f11c67d82aebfb4ee9fd51b61110 (patch)
tree48dcc3d99b0eadc7b792153ceefa482f0a0ba0c1 /IkiWiki
parentc7070ddd48232f43cbc4d48b399aad9636084364 (diff)
downloadikiwiki-636e04a13a96f11c67d82aebfb4ee9fd51b61110.tar
ikiwiki-636e04a13a96f11c67d82aebfb4ee9fd51b61110.tar.gz
make layers an array
this simplifies the code, make the configuration more intuitive, at the cost of making the labels on the layers automatically generated and therefore less customizable
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/Plugin/osm.pm14
1 files changed, 2 insertions, 12 deletions
diff --git a/IkiWiki/Plugin/osm.pm b/IkiWiki/Plugin/osm.pm
index 4c50fec53..2c555f372 100644
--- a/IkiWiki/Plugin/osm.pm
+++ b/IkiWiki/Plugin/osm.pm
@@ -69,17 +69,8 @@ sub getsetup () {
},
osm_layers => {
type => "string",
- example => { OSM => 1,
- Google => 'Hybrid',
- },
- description => "Layers to use in the map. If the value is 1, use the default for the map, otherwise the argument is a URL (for OSM layers, e.g. http://a.tile.stamen.com/toner/\${z}/\${x}/\${y}.png) or a type option for Google maps (Normal, Satellite, Hybrid or Physical).",
- safe => 0,
- rebuild => 1,
- },
- osm_layers_order => {
- type => "string",
- example => { 'OSM', 'Google' },
- description => "Display order for the layers. The first layer is the default layer, must match exactly the left side of the osm_layers hash.",
+ example => { 'OSM', 'GoogleSattelite' },
+ 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,
},
@@ -590,7 +581,6 @@ sub map_setup_code($;@) {
$options{'mapurl'} = $mapurl;
}
$options{'layers'} = $config{osm_layers};
- $options{'layers_order'} = $config{osm_layers_order};
return "mapsetup('mapdiv-$name', " . to_json(\%options) . ");";
}