diff options
author | BlueRaja <BlueRaja.admin@gmail.com> | 2012-08-18 19:50:20 -0500 |
---|---|---|
committer | BlueRaja <BlueRaja.admin@gmail.com> | 2012-08-18 19:50:20 -0500 |
commit | 55656d931a05f533e11b8a3860c5dce4c66c88ca (patch) | |
tree | 9c3297a89cfc02f5c663c6c4ff26cc8af829df06 | |
parent | dc2e5f61451d10fc2dd6d4255a5602dbbb69def2 (diff) | |
download | pathery-55656d931a05f533e11b8a3860c5dce4c66c88ca.tar.xz |
Preloading of path images
-rw-r--r-- | includes/header.php | 10 | ||||
-rw-r--r-- | includes/maps.php | 16 |
2 files changed, 11 insertions, 15 deletions
diff --git a/includes/header.php b/includes/header.php index 4e19fad..f9b0f18 100644 --- a/includes/header.php +++ b/includes/header.php @@ -56,7 +56,17 @@ function hideSignin() { }
function htmlFooter() {
+ //Preload the path-images and add the google-analytics script
?>
+ <div style='visibility:hidden;display:none'>
+ <img src='images/Path1.png' alt=''>
+ <img src='images/Path2.png' alt=''>
+ <img src='images/Path3.png' alt=''>
+ <img src='images/Path4.png' alt=''>
+ <img src='images/OverlayTileFaceted50.png' alt=''>
+ <img src='images/OverlayTileFaceted30.png' alt=''>
+ <img src='images/OverlayTileFaceted10.png' alt=''>
+ </div>
<script>
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-371072-3']);
diff --git a/includes/maps.php b/includes/maps.php index 1f2363a..7a2996d 100644 --- a/includes/maps.php +++ b/includes/maps.php @@ -107,19 +107,6 @@ function DisplayMap($mapMatrix, $idprefix = 1, $style = 'normal', $speed = NULL) //$height = (($i * 22) + 2).'px';
$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'>
- <img src='images/Path1.png' alt=''>
- <img src='images/Path2.png' alt=''>
- <img src='images/Path3.png' alt=''>
- <img src='images/Path4.png' alt=''>
- <img src='images/OverlayTileFaceted50.png' alt=''>
- <img src='images/OverlayTileFaceted30.png' alt=''>
- <img src='images/OverlayTileFaceted10.png' alt=''>
- </div>";
//$mapdatadiv .= "<div id='$idprefix,mapdata' style='visibility:hidden;display:none'>";
//$mapdatadiv .= $jsonmap;
@@ -131,8 +118,7 @@ function DisplayMap($mapMatrix, $idprefix = 1, $style = 'normal', $speed = NULL) </script>";
- $maptable = "$preloaddiv
- <table style='width:$width;height:$height;' class='grid_table'>
+ $maptable = "<table style='width:$width;height:$height;' class='grid_table'>
$maptable
</table>";
|