diff options
author | Patrick Davison <snapwilliam@gmail.com> | 2012-07-31 22:23:55 -0700 |
---|---|---|
committer | Patrick Davison <snapwilliam@gmail.com> | 2012-07-31 22:23:55 -0700 |
commit | 628c2e712e39fe85762583fd1ddc12609746fc58 (patch) | |
tree | 4e966f38755077a0d119d71ce8931ccc34ba10d8 /includes/maps.php | |
parent | 79d928cd42c32122edd47d1a450fb0c4ced3de2f (diff) | |
download | pathery-628c2e712e39fe85762583fd1ddc12609746fc58.tar.xz |
Bug regarding having no speed cookies for speed options.
Diffstat (limited to 'includes/maps.php')
-rw-r--r-- | includes/maps.php | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/includes/maps.php b/includes/maps.php index 16aa35c..1f2363a 100644 --- a/includes/maps.php +++ b/includes/maps.php @@ -108,6 +108,7 @@ function DisplayMap($mapMatrix, $idprefix = 1, $style = 'normal', $speed = NULL) $jsonmap = str_replace("'", "\'", json_encode($mapdata));
+ //!! This should move to header.php
//This works in chrome, not sure about others.
$preloaddiv = "
<div style='visibility:hidden;display:none'>
@@ -135,13 +136,13 @@ function DisplayMap($mapMatrix, $idprefix = 1, $style = 'normal', $speed = NULL) $maptable
</table>";
-
+ $speedOption['Slow'] = 1;
+ $speedOption['Med'] = 2;
+ $speedOption['Fast'] = 3;
+ $speedOption['Ultra'] = 4;
+
if (isset($_COOKIE['pref_speed'])) {
$prefSpeed = $_COOKIE['pref_speed'];
- $speedOption['Slow'] = 1;
- $speedOption['Med'] = 2;
- $speedOption['Fast'] = 3;
- $speedOption['Ultra'] = 4;
if (!in_array($prefSpeed, $speedOption))
$prefSpeed = '2';
} else
|