]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/osm.pm
osm: do not override sorting order of layers
[git.ikiwiki.info.git] / IkiWiki / Plugin / osm.pm
index d86dbd66ec9d992aeb33243e95d64357fdd20d42..f570f4032e00150ad7d57235f366925e8e47758e 100644 (file)
@@ -67,10 +67,10 @@ sub getsetup () {
                        safe => 0,
                        rebuild => 1,
                },
-               osm_map_url => {
+               osm_layers => {
                        type => "string",
-                       example => "/tiles/\${z}/\${x}/\${y}.png",
-                       description => "Url to get map tiles from (if none specified, uses the openstreetmap server, see http://wiki.openstreetmap.org/wiki/Creating_your_own_tiles for more info on serving your own tiles)",
+                       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,
                },
@@ -580,6 +580,7 @@ sub map_setup_code($;@) {
        if ($mapurl) {
                $options{'mapurl'} = $mapurl;
        }
+        $options{'layers'} = $config{osm_layers};
 
        return "mapsetup('mapdiv-$name', " . to_json(\%options) . ");";
 }