[OpenLayers-Users] RE Change default image in tree node with GeoExt/Extjs

Steve.Toutant at inspq.qc.ca Steve.Toutant at inspq.qc.ca
Fri Jul 26 12:03:19 PDT 2013


I think you should ask on the geoext mailing list
Steve





Cristhian Boujon <cristhianboujon at gmail.com>@lists.osgeo.org 
Envoyé par : openlayers-users-bounces at lists.osgeo.org
2013-07-26 11:41

A
openlayers-users at lists.osgeo.org
cc

Objet
[OpenLayers-Users] Change default image in tree node with GeoExt/Extjs








Hello all,

I'm using GeoExt (based on ExtJs) to create a tree. In each node I want 
the corresponding image at left instead of the default image like this 
site. How can I do it?
Here is part of my code:


var bpn = new OpenLayers.Layer.WMS("bpn", 
    url,
    {
        LAYERS: [ 'Año 2004', 'Año 2005', 'Año 2006', 'Año 2007', 'Año 
2009'],
        format: "image/png",
        transparent: "true",
        projection: 'EPSG:4326'
     },
     {
         buffer: 0, 
         displayOutsideMaxExtent: true,
         isBaseLayer: false,
         displayInLayerSwitcher: false,
         yx: {'EPSG:4326' : true}
      });

var treeConfig = [
    {
        nodeType: "gx_layer",
        layer: bpn,
        isLeaf: false,

        loader: {
            param: "LAYERS",

        },
        expanded: false
    }];

tree = new Ext.tree.TreePanel({
    border: true,
    region: "west",
    title: "Entre Ríos",
    width: 250,
    split: true,
    collapsible: true,
    collapseMode: "mini",
    autoScroll: true,

    loader: new Ext.tree.TreeLoader({
        applyLoader: true,
        uiProviders: {
            "layernodeui": LayerNodeUI
        }
    }),
    root: {
        nodeType: "async",
        children: treeConfig
    }, 
    rootVisible: false,
    lines: false,
});




Each layer (node) 'Año 2004', 'Año 2005', 'Año 2006', 'Año 2007', 'Año 
2009' has a different image. What should I change in treeConfig? 



Regards,

-- 
Cristhian A. Boujon.
_______________________________________________
Users mailing list
Users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/openlayers-users



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20130726/1965370a/attachment.html>


More information about the Users mailing list