Thanks for the hint. I don't know any more why I used indexOf...
I tried a jQuery-fied version like
for (var l in layers) {
$('#spxg_' +
l).removeClass('unvis').removeClass('vis').addClass(layers[l]);
}
and it worked fine. If you can try if it also removes your problem than
I will put that on the main code. It's probably possible to have it in a
more elegant jQuery notation but I did not find anything better.
I found another bug when testing this. With the new jQuery 1.2 the
switching on/off of categories does not work any more correctly. with
the latest 1.1 (1.1.4) it's still ok. I'll have to see what identifiers
they modified, the problem should be in setcategories(cat).
armin
Alessandro Pasotti wrote:
> Hi all,
>
> I've run into a bug in function updateTocScale(tocurl), when I have two
> layers
> with a similar name the vis/unvis classes are not applied correctly:
>
> I have two raster layers named
> Satellite
> SatelliteHiRes
>
> The check on line 161 (3.2beta1)
> if (spanObj.id.indexOf( 'spxg_' + l) != -1) {
>
> returns true for the second layer even when l is "Satellite".
>
> A quick fix is to do an exact comparison:
>
> if (spanObj.id == 'spxg_' + l) {
>
> but I completely ignore why the check was like that, so probably my fix will
> not work in other situations.
>
> Perhaps a match() function on the id would do a better job.
>
>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
pmapper-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pmapper-users