},
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,
},
$options{'mapurl'} = $mapurl;
}
$options{'layers'} = $config{osm_layers};
- $options{'layers_order'} = $config{osm_layers_order};
return "mapsetup('mapdiv-$name', " . to_json(\%options) . ");";
}