X-Git-Url: http://git.rrze.uni-erlangen.de/gitweb/?p=osmrrze.git;a=blobdiff_plain;f=cgis%2Fosm-map.pl;h=f7999cac355df54e7e88ac34c29ab2a17001152f;hp=602efcdec5db406e2ccb6c77aeb1a3f8a3c6f297;hb=25c0fde361609c019e460709c107ff0b6e09cdd4;hpb=91afa24cea84e500890b076920a239a143f5d840 diff --git a/cgis/osm-map.pl b/cgis/osm-map.pl index 602efcd..f7999ca 100755 --- a/cgis/osm-map.pl +++ b/cgis/osm-map.pl @@ -5,6 +5,9 @@ # The file from which we get the Template for Openlayers? $openlayerstemplate = '/var/www/index.openlayers.html'; +# The file from which we get the Template for Openlayers? +$leaflettemplate = '/var/www/index.leaflet.html'; + # Your should not need to change anything below this line # ---------------------------------------------------------------------------- @@ -58,8 +61,12 @@ if (($lon == -999.0) && ($lat == -999.0)) { if ($mlat != -999.0) { $lat = $mlat; } if ($mlon != -999.0) { $lon = $mlon; } } +$mytemplate = $openlayerstemplate; # Openlayers +if ($0 =~ m/-leaflet/) { + $mytemplate = $leaflettemplate; # leaflet +} my $OLF; -unless (open($OLF, '<' . $openlayerstemplate)) { +unless (open($OLF, '<' . $mytemplate)) { print("Sorry, failed to read my map template.\n"); exit(0); } while ($ll = <$OLF>) {