projects
/
osmrrze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
91afa24
)
also support leaflet map if called under a filename containing -leaflet
author
osm@osm.rrze
<osm@osm.rrze.uni-erlangen.de>
Wed, 5 Dec 2012 10:00:41 +0000
(11:00 +0100)
committer
osm@osm.rrze
<osm@osm.rrze.uni-erlangen.de>
Wed, 5 Dec 2012 10:00:41 +0000
(11:00 +0100)
cgis/osm-map.pl
patch
|
blob
|
blame
|
history
diff --git
a/cgis/osm-map.pl
b/cgis/osm-map.pl
index 602efcdec5db406e2ccb6c77aeb1a3f8a3c6f297..f7999cac355df54e7e88ac34c29ab2a17001152f 100755
(executable)
--- 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?
$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
# ----------------------------------------------------------------------------
# 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; }
}
if ($mlat != -999.0) { $lat = $mlat; }
if ($mlon != -999.0) { $lon = $mlon; }
}
+$mytemplate = $openlayerstemplate; # Openlayers
+if ($0 =~ m/-leaflet/) {
+ $mytemplate = $leaflettemplate; # leaflet
+}
my $OLF;
my $OLF;
-unless (open($OLF, '<' . $
openlayers
template)) {
+unless (open($OLF, '<' . $
my
template)) {
print("Sorry, failed to read my map template.\n"); exit(0);
}
while ($ll = <$OLF>) {
print("Sorry, failed to read my map template.\n"); exit(0);
}
while ($ll = <$OLF>) {
This page took
0.048953 seconds
and
4
git commands to generate.