# 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
# ----------------------------------------------------------------------------
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>) {