[Chameleon-dev] [Bug 1486] New: WMSCache: incorrect nesting of layers

bugzilla-daemon at bugzilla.maptools.org bugzilla-daemon at bugzilla.maptools.org
Mon Jun 12 06:43:00 EDT 2006


http://bugzilla.maptools.org/show_bug.cgi?id=1486

           Summary: WMSCache: incorrect nesting of layers
           Product: Chameleon
           Version: 2.4
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Widget
        AssignedTo: chameleon-dev at lists.maptools.org
        ReportedBy: bartvde at xs4all.nl


In the following use case the WMSCache widget has an inccorect nesting of layers:

-LayerA
 -LayerB
  -LayerC
 -LayerD

LayerD is depicted at the level of LayerA, whereas it should be at the same
level as layerB.

The fix is to move a part of the loop in WMSCache.widget.php out of the loop.

Old code:
for ($x = 0; $x < $nMoveBy; $x ++)
{
  $nLastDot = strrpos( $szParentLayer, "." );
  if ($nLastDot !== false)
    $szParentLayer = substr( $szParentLayer, 0,
      $nLastDot );
  $nLastDot = strrpos( $szParentLayer, "." );
  if ($nLastDot !== false)
    $szParentLayer = substr( $szParentLayer, 0,
      $nLastDot );

  $szCurrentLayer = $szParentLayer.".".
    $axLayer["layer_id"];
}

New code:
for ($x = 0; $x < $nMoveBy; $x ++)
{
  $nLastDot = strrpos( $szParentLayer, "." );
  if ($nLastDot !== false)
    $szParentLayer = substr( $szParentLayer, 0,
      $nLastDot );
}
$nLastDot = strrpos( $szParentLayer, "." );
if ($nLastDot !== false)
  $szParentLayer = substr( $szParentLayer, 0,
    $nLastDot );

$szCurrentLayer = $szParentLayer.".".
  $axLayer["layer_id"];

Will attach a sample WMS capabilities to reproduce as well as a
incorrect/correct image of the WMSBrowser image situation.

This needs to be fixed in 2.4.X as well IMHO.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


Please do NOT reply to this email, use the link above instead to 
login to bugzilla and submit your comment. Any email reply to this
address will be lost.


More information about the Chameleon-dev mailing list