Summary: | LegendTemplateGetLayerName javascript array contents not always correct | ||
---|---|---|---|
Product: | Chameleon | Reporter: | Bart van den Eijnden <bartvde@osgis.nl> |
Component: | Widget | Assignee: | chameleon-dev <chameleon-dev@lists.maptools.org> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | P2 | ||
Version: | 1.99 | ||
Target Milestone: | 1.99 beta 4 | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Whiteboard: |
looks good, please implement.
Fixed in CVS, revision 1.13 of LegendTemplate.widget.php.
I have found an issue with this fix and propose the following now: $icounter = 0; for( $i=0; $i< $oMap->numlayers; $i++) { $oLayer = $oMap->getLayer( $i ); if ($oLayer->status == MS_DELETE) { } else { $oLayer->setmetadata( "layer_index", $icounter ); $szLayers .= 'aLayers['.$icounter.'] = "'.$oLayer->name.'";'."\n"; $icounter++; } }
ok, I see the problem with using $i if you are deleting layers :)
Chanegd target to 1.99 RC 1.
Bart, if you fixed this and have committed it, please close the bug so we can verify it for the release.
Paul, I have just committed my final fix to CVS. Revision 1.19 for LegendTemplate.widget.php. Sorry for leaving this so long. Maybe it would be useful to change the "Assigned To" for this type of bug to me, so there would be less chance of me leaving this so long :), but I probably don't have bugzilla rights to do this.
Bart, I believe that anyone in bugzilla can assign a bug to themselves :) Thanks for getting this in.