[Users] LayerTree in Drake

Alexandre Dube adube at mapgears.com
Mon Feb 16 19:33:00 CET 2009


I agree. The only issue is that my remaining time is running out.

Right now, I managed to have a tree that does what I need. I only have a 
couple of smalls issues left and would like to have some hints.

I'd like to get rid of the [+] next to the class names ( like before 
"nom de direction" ). How do I do that ?

Here's how I define the "class" nodes :

for(var szClass in oLayer['class']){
var oClass = oLayer['class'][szClass];
var oClassNode = {
nodeType: 'async', // (1)<----
text: oClass.name,
icon: oClass.icon
};
aoClass.push(oClassNode);
}

(1) I think it has something to do with that...

Thanks again,

Alexandre

Andreas Hocevar wrote:
> Andreas Hocevar wrote:
>> Alexandre Dube wrote:
>>> Hi,
>>>
>>> Please, correct me if I'm wrong, but it seems that the only current 
>>> possible way to have an extra level "GROUP" is to have one OL layer 
>>> object per group, have them in a hard coded tree of 
>>> filteredLayerNode, I am right ?
>>
>> Not necessarily hard-coded, because it can be configured using a JSON 
>> object, one that you may be able to generate as MapServer template. 
>> But yes, every OpenLayers.Layer.WMS would be represented by a 
>> filteredLayerNode. See below.
>
> Also worth noting: It would not be hard to write another convenience 
> (root) node, like LayerContainerNode, that analyzes the layers and 
> creates a config like that.
>
> Andreas.
>


-- 
Alexandre Dubé
Mapgears
www.mapgears.com



More information about the Users mailing list