From b93f6c2fd1711fecda4785bde77ba840d2721c53 Mon Sep 17 00:00:00 2001 From: rac98 Date: Thu, 15 Oct 2009 13:42:55 +0000 Subject: [PATCH] fixes git-svn-id: http://svn.code.sf.net/p/staticmaplite/code@6 3c7674d3-d6c2-4d0e-87b7-95661b9333b9 --- staticmap.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/staticmap.php b/staticmap.php index 2e2856c..31b1a7d 100644 --- a/staticmap.php +++ b/staticmap.php @@ -50,7 +50,7 @@ Class staticMapLite { 'offsetShadow'=>false ), 'ol-marker'=> array('regex'=>'/^ol-marker(|-blue|-gold|-green)+$/', - 'extension'=>'ol-marker{1}.png', + 'extension'=>'.png', 'shadow'=>'../marker_shadow.png', 'offsetImage'=>'-10,-25', 'offsetShadow'=>'-1,-13' @@ -62,7 +62,7 @@ Class staticMapLite { protected $useTileCache = true; protected $tileCacheBaseDir = 'cache/tiles'; - protected $useMapCache = false; + protected $useMapCache = true; protected $mapCacheBaseDir = 'cache/maps'; protected $mapCacheID = ''; protected $mapCacheFile = ''; @@ -183,14 +183,13 @@ Class staticMapLite { } } } - + // check required files or set default - if(!file_exists($this->markerBaseDir.'/'.$markerFilename)){ + if($markerFilename == '' || !file_exists($this->markerBaseDir.'/'.$markerFilename)){ $markerIndex++; $markerFilename = 'lightblue'.$markerIndex.'.png'; $markerImageOffsetX = 0; - $markerImageOffsetY = -19; - } + $markerImageOffsetY = -19; } // create img resource if(file_exists($this->markerBaseDir.'/'.$markerFilename)){