[fusion-commits] r1776 - trunk/layers/MapServer/php
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Thu Feb 5 09:13:00 EST 2009
Author: pdeschamps
Date: 2009-02-05 09:13:00 -0500 (Thu, 05 Feb 2009)
New Revision: 1776
Modified:
trunk/layers/MapServer/php/LoadMap.php
Log:
added login in the scale processing to reset the layers min / max
scales to be set to the main map's min man scales if they happen
to exceede the main map scales. without this you get un expected
ui behaviour in the legend. closes bug#176
Modified: trunk/layers/MapServer/php/LoadMap.php
===================================================================
--- trunk/layers/MapServer/php/LoadMap.php 2009-02-04 19:39:02 UTC (rev 1775)
+++ trunk/layers/MapServer/php/LoadMap.php 2009-02-05 14:13:00 UTC (rev 1776)
@@ -268,6 +268,16 @@
$layerMin = $layer->minscale == -1 ? $minScale : $layer->minscale;
$layerMax = $layer->maxscale == -1 ? $maxScale : $layer->maxscale;
+ /* check to see that the layer has a vaild scale range
+ * inside the defined map's main min max scale ranges
+ * set them to the maps scale ranges if they exceede
+ */
+ if($layer->minscale != -1 && $layerMin < $minScale)
+ $layerMin = $minScale;
+
+ if($layer->maxscale != -1 && $layerMax > $maxScale)
+ $layerMax = $maxScale;
+
//find all the unique scale breaks in this layer
$aScaleBreaks = array($layerMin, $layerMax);
for ($j=0; $j<$layer->numclasses; $j++) {
@@ -352,6 +362,7 @@
$b = $layer->getMetaData('groupVisible');
$group->visible = ($b == 'false') ? false : true;
$group->actuallyVisible = $layer->isVisible();
+ $group->groupParent = $layer->getMetaData('groupParent');
return $group;
}
More information about the fusion-commits
mailing list