[fusion-commits] r1597 - trunk/MapServer/php
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Tue Oct 14 12:01:41 EDT 2008
Author: Assefa
Date: 2008-10-14 12:01:41 -0400 (Tue, 14 Oct 2008)
New Revision: 1597
Modified:
trunk/MapServer/php/LoadMap.php
Log:
Correct errors with scale range settings on layers (#129)
Modified: trunk/MapServer/php/LoadMap.php
===================================================================
--- trunk/MapServer/php/LoadMap.php 2008-10-14 15:41:13 UTC (rev 1596)
+++ trunk/MapServer/php/LoadMap.php 2008-10-14 16:01:41 UTC (rev 1597)
@@ -110,8 +110,8 @@
$mapObj = NULL;
if ($oMap) {
- header('Content-type: text/x-json');
- header('X-JSON: true');
+ //header('Content-type: text/x-json');
+ //header('X-JSON: true');
$mapObj->sessionId = $sessionID;
$mapObj->mapId = $mapId;
@@ -211,6 +211,7 @@
$selectable = strtolower($layer->getMetaData('selectable'));
$layerObj->selectable = $selectable == 'true' ? true : false;
+
$layerObj->visible = ($layer->status == MS_ON || $layer->status == MS_DEFAULT);
$layerObj->actuallyVisible = true;
@@ -276,12 +277,12 @@
$_SESSION['scale_ranges'][$i] = $aScaleRanges;
/*get the min/max scale for the layer*/
$nCount = count($aScaleRanges);
- $layerObj->minScale = $oScaleRanges[0]->minScale;
- $layerObj->maxScale = $oScaleRanges[0]->maxScale;
+ $layerObj->minScale = $aScaleRanges[0]->minScale;
+ $layerObj->maxScale = $aScaleRanges[0]->maxScale;
for ($j=1; $j<$nCount; $j++)
{
- $layerObj->minScale = min($layerObj->minScale, $oScaleRanges[$j]->minScale);
- $layerObj->maxScale = max($layerObj->maxScale, $oScaleRanges[$j]->maxScale);
+ $layerObj->minScale = min($layerObj->minScale, $aScaleRanges[$j]->minScale);
+ $layerObj->maxScale = max($layerObj->maxScale, $aScaleRanges[$j]->maxScale);
}
array_push($mapObj->layers, $layerObj);
}
More information about the fusion-commits
mailing list