[Cartoweb-users] duplicate layers in LayerReorder folder

Gilles Bassière gilles.bassiere at makina-corpus.com
Fri Mar 7 08:16:15 EST 2008


Hi Cartoweb users,

I faced a weird problem with the layerReorder plugin. Some layers appear 
more than once in the layers list. I try to explain :
In the layerreorder folder, I can see a list of layers. For each layers, 
I have a radio button, the layer name and the transparency selection 
list. So far, so good...
The problem is that I get several occurence of a some layers in the list :(

I checked and re-checked my configuration, my svn logs and so on but I 
can't find anything that may explain this behavior. I only found 2 hints :

1) There are probably some implications with the autoClassLegend feature 
because :
- if autoClassLegend is set to false, there is no duplication at all
- if autoClassLegend is set to true, only the layers that have an 
auto-icon are duplicated (some don't have any class name in my mapfile, 
hence no auto-icon).

2) When the problem happen, the number of occurence of a buggy layer is 
always 2 n + 1 where n is the number of classes of the layer (in the 
mapfile). For example, a layer "zzz" has 3 classes defined, it will have 
7 occurence in the layerreorder list.

Well, it looks like my layers' classes are somewhat considered as real 
layers... Anyway, I overrode ServerLayerReorder.php and added an 
array_unique() in the getInit() function before returning the layer 
list. This quick hack works but the problem remains and I'd like to 
understand why. Does anybody had a similar problem or can provide any help ?

I use Cartoweb 3.4 with MapScript revision 6872.

Regards
Gilles

-- 
Gilles Bassiere
MAKINA CORPUS
30 rue des Jeuneurs
FR-75002 PARIS
+33 (0) 1 44 82 00 80
http://www.makina-corpus.com



More information about the Cartoweb-users mailing list