[ka-Map-users] KaLegend bug

Gabriele B gabbag981 at hotmail.com
Tue Jun 26 05:07:18 EDT 2007


Hi list

I was playing with two maps in Ka-map explorer interface. Let's call 'em 
map1 and map2.
By default kamap loads map1.
When I switch to map2 it was all ok.
When I return to map1 all tiled images were still shown, but all the 
checkboxes of the layers in the legend were all unchecked.

I tried to declare myKaLegend as a global variable without success.

I tried

myKalegend.update(KAMAP_MAP_INITIALIZED); in mySetMap()

but I still had the same problem.

I tried to check the layer.visible property in kaLegend.createLayerHTML 
function and I understood that this function was called only the first time 
that a map is loaded...

I tried this in mySetMap function :

var aLayers = oMap.getAllLayers();
    for (var i=(aLayers.length-1);i>=0;i--) {
        if (aLayers[i].kaLegendObj == null) {
            myKaLegend.createLayerHTML( aLayers[i] );
        } else {
            try{myKaLegend.domObj.removeChild( aLayers[i].kaLegendObj );}
            catch(e){};
        }
    }

as in kaLegend.draw() method : still insuccess :(

I resolved the problem calling myOnLoad() function in mySetMap even if I had 
to reset the viewport div calling

getRawObject('viewport').innerHTML="";
myOnLoad();

My wish is to find a way to make this without re-initialize all the js 
objects and events. If someone can help I can appreciate.

(Sorry for my english)

ciao....

_________________________________________________________________
Cinema, Tv, Gossip e Orsoscopo
Tutto su MSN intrattenimento! 
http://intrattenimento.it.msn.com/



More information about the ka-Map-users mailing list