[fusion-commits] r1596 - trunk/MapServer/php
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Tue Oct 14 11:41:13 EDT 2008
Author: Assefa
Date: 2008-10-14 11:41:13 -0400 (Tue, 14 Oct 2008)
New Revision: 1596
Modified:
trunk/MapServer/php/LoadScaleRanges.php
Log:
Correct bug related to imagepath.imageurl (#131)
Modified: trunk/MapServer/php/LoadScaleRanges.php
===================================================================
--- trunk/MapServer/php/LoadScaleRanges.php 2008-10-14 15:39:12 UTC (rev 1595)
+++ trunk/MapServer/php/LoadScaleRanges.php 2008-10-14 15:41:13 UTC (rev 1596)
@@ -104,6 +104,18 @@
if ($nTotalClasses > 0)
{
+ //set the image path and image dir based on what fusion config file
+ $configObj = $_SESSION['fusionConfig'];
+
+ $original_imagepath = $oMap->web->imagepath;
+ $original_imageurl = $oMap->web->imageurl;
+
+ if (isset($configObj->mapserver->imagePath) && $configObj->mapserver->imagePath !="")
+ $oMap->web->set("imagepath", $configObj->mapserver->imagePath);
+
+ if(isset($configObj->mapserver->imageUrl) && $configObj->mapserver->imageUrl!="")
+ $oMap->web->set("imageurl", $configObj->mapserver->imageUrl);
+
//build and image containing all the icons and return url
$nTmpWidth = $oMap->width;
$nTmpHeight = $oMap->height;
@@ -118,17 +130,14 @@
for ($i=0; $i<$nTotalClasses;$i++)
$oImage->pasteImage($aIcons[$i], -1, $i*$nIconWidth, 0);
- //set the image path and image dir based on what fusion config file
- $configObj = $_SESSION['fusionConfig'];
- if (isset($configObj->mapserver->imagePath) && isset($configObj->mapserver->imageUrl))
- {
- $oImage->set("imagepath", $configObj->mapserver->imagePath);
- $oImage->set("imageurl", $configObj->mapserver->imageUrl);
- }
$scaleObj->icons_url = $oImage->saveWebImage();
$scaleObj->icons_width = $nIconWidth;
$scaleObj->icons_height = $nIconHeight;
+
+ $oMap->web->set("imagepath", $original_imagepath);
+ $oMap->web->set("imageurl", $original_imageurl);
+
}
header('Content-type: text/x-json');
More information about the fusion-commits
mailing list