From: User for running Openstreetmap-things Date: Sun, 1 Feb 2015 22:01:26 +0000 (+0100) Subject: support more layers, also support leaflet permalinks (so the noscript-replacement... X-Git-Url: http://git.rrze.uni-erlangen.de/gitweb/?a=commitdiff_plain;h=898873d3448bc42339b82af56fe1ec1f6c18eed2;p=osmrrze.git support more layers, also support leaflet permalinks (so the noscript-replacement show the correct map) --- diff --git a/cgis/osm-map.pl b/cgis/osm-map.pl index f7999ca..b5157dc 100755 --- a/cgis/osm-map.pl +++ b/cgis/osm-map.pl @@ -47,7 +47,8 @@ if (defined(param('zoom'))) { if (($zoom < 0) || ($zoom > 30)) { $lat = -1; } } if (defined(param('layers'))) { - my @layerlist = ('osmde', 'osmorg'); + # Mapping for Openlayers Permalinks + my @layerlist = ('osmde', 'osmorg', 'osmorglowzoom', 'luftbilderl'); my $layers = param('layers'); my $i; for ($i = 0; $i < int(@layerlist); $i++) { @@ -56,6 +57,14 @@ if (defined(param('layers'))) { } } } +if (defined(param('layer'))) { + # Mapping for Leaflet Permalinks + my $layers = param('layer'); + if ($layers eq 'RRZE tileserver osm.de style tiles') { $baselayer = 'osmde'; } + if ($layers eq 'RRZE tileserver osm.org style tiles') { $baselayer = 'osmorg'; } + if ($layers eq 'RRZE tileserver osm.org style with different lowzoom tiles') { $baselayer = 'osmorglowzoom'; } + if ($layers eq 'Luftbild Erlangen') { $baselayer = 'luftbilderl'; } +} # If mlon/mlat is defined but lon/lat isn't, use mlat/mlon as center pos. if (($lon == -999.0) && ($lat == -999.0)) { if ($mlat != -999.0) { $lat = $mlat; }