[fusion-trac] #77: Function "getGroupObject(..)" in
MapServer/php/LoadMap.php not quering group information correctly
Fusion
trac_fusion at osgeo.org
Thu Jun 12 02:24:29 EDT 2008
#77: Function "getGroupObject(..)" in MapServer/php/LoadMap.php not quering
group information correctly
---------------------------+------------------------------------------------
Reporter: schneiderei | Owner: madair
Type: defect | Status: new
Priority: P2 | Milestone: 1.1
Component: MapServer | Version: 1.0.6
Severity: Critical | Keywords:
External_id: | State: New
Browser: All | Os: All
---------------------------+------------------------------------------------
Line 262 in the file MapServer/php/LoadMap.php reads:
array_push($mapObj->groups,
getGroupObject($oMap->getLayer($aLayerIndexes[0])));
The layer that is passed to getGroupObject(..) may or may not be a group
layer. In the function getGroupObject(..), group information is queried
from this layer through calls such as
"$layer->getMetaData('groupLegendLabel')". It seems to me that group
information is not returned if the layer is not a group layer. As a
result, all metainformation specified for groups in the map file is
ignored.
There are a number of solutions to this. One would be to just add a second
parameter to the getGroupObject(..) function where the according group
layer is passed. Line 262 then could look like this:
array_push($mapObj->groups,
getGroupObject($oMap->getLayer($aLayerIndexes[0]),
$oMap->getLayerByName($groupName)));
All metadata queries in getGroupObject(..) would then go to the group
layer.
--
Ticket URL: <http://trac.osgeo.org/fusion/ticket/77>
Fusion <http://trac.osgeo.org/fusion>
Fusion is a web-mapping application development framework for MapServer and MapGuide OS.
More information about the fusion-trac
mailing list