[Users] GeoExt Tree node Layers not visible when Openlayers is upgraded to latest version 2.10

Andreas Hocevar ahocevar at opengeo.org
Mon Oct 25 09:56:39 CEST 2010


Hi,

OpenLayers 2.10 and GeoExt 0.7 is an untested combination. You could upgrade to GeoExt 1.0, but then please read the release notes or look at the tree.html example to learn how to replace the RadioButtonMixin (which no longer exists) with a plugin.

Regards,
Andreas.

On Oct 11, 2010, at 11:19 , Anthony Tuffour wrote:

> Hi all,
> 
> I have upgraded to the latest version of Openlayers 2.10 and for some reason my GeoExt Tree Nodes layers are not visible when turned on. However, when I click on the map for WMSGetFeatureInfo even if the layers are not visible, I get the correct feature attributes results back in a popup. No errors as well. I have not changed anything in my application. I am using GeoExt version 0.7. However, with the previous version of Openlayers 2.9
> 
> GeoExt Tree nodes code below;
> 
> /* --------------------------------------------------------------
> 
> *  Treeview
> 
> * -------------------------------------------------------------- */
> 
> function hackneylayertree() {
> 
> var LayerNodeUI = Ext.extend(
> 
>         GeoExt.tree.LayerNodeUI, new GeoExt.tree.RadioButtonMixin()
> 
>             );
> 
> // configuration for editing it in the UI
> 
> var treeConfig = [
> 
>        {
> 
>        nodeType: "gx_baselayercontainer",
> 
>        text: "Baselayer",
> 
>        leaf: false,
> 
>        expanded: boltreeExpand
> 
>    },
> 
> /* --------------------------------------------------------------
> 
> *  Overlays
> 
> * -------------------------------------------------------------- */
> 
> {
> 
> text: "Overlays",
> 
> expanded: true,
> 
> children: [{
> 
>     nodeType: 'gx_layer',
> 
>     layer: "Hackney Parks",
> 
>     icon: wmsURL + 'REQUEST=GetLegendGraphic&VERSION=1.0.0&FORMAT=image/png&WIDTH=' + iconWidth + '&HEIGHT=' + iconHeight + '&LAYER=Hackney Parks'
> 
>         },
> 
>          {
> 
>              nodeType: 'gx_layer',
> 
>              layer: "Water Regions",
> 
>              icon: wmsURL + 'REQUEST=GetLegendGraphic&VERSION=1.0.0&FORMAT=image/png&WIDTH=' + iconWidth + '&HEIGHT=' + iconHeight + '&LAYER=Water Regions',
> 
>              qtip: qtipTooltip
> 
>          }]
> 
> },
> 
> /* --------------------------------------------------------------
> 
> *  Community and Living
> 
> * -------------------------------------------------------------- */
> 
> {
> 
> text: "Community and Living",
> 
> expanded: boltreeExpand,
> 
> children: [{
> 
>     nodeType: 'gx_layer',
> 
>     layer: "Places of Worship",
> 
>     icon: wmsURL + 'REQUEST=GetLegendGraphic&VERSION=1.0.0&FORMAT=image/png&WIDTH=' + iconWidth + '&HEIGHT=' + iconHeight + '&LAYER=Places of Worship'
> 
>          },
> 
>       {
> 
>           nodeType: 'gx_layer',
> 
>           layer: "Voluntary Organisations",
> 
>           icon: wmsURL + 'REQUEST=GetLegendGraphic&VERSION=1.0.0&FORMAT=image/png&WIDTH=' + iconWidth + '&HEIGHT=' + iconHeight + '&LAYER=Voluntary Organisations',
> 
>           qtip: qtipTooltip
> 
> }]
> 
> },
> 
> /* --------------------------------------------------------------
> 
> *  Transport and Streets
> 
> * -------------------------------------------------------------- */
> 
> {
> 
> text: "Transport and Streets",
> 
> expanded: boltreeExpand,
> 
> children: [
> 
>            {
> 
>                nodeType: 'gx_layer',
> 
>                layer: "Train Stations",
> 
>                icon: wmsURL + 'REQUEST=GetLegendGraphic&VERSION=1.0.0&FORMAT=image/png&WIDTH=' + iconWidth + '&HEIGHT=' + iconHeight + '&LAYER=TSI_LBH_RAIL_STATIONS',
> 
>                qtip: qtipTooltip
> 
>            },
> 
>          {
> 
>              nodeType: 'gx_layer',
> 
>              layer: "Cycle Stands",
> 
>              icon: wmsURL + 'REQUEST=GetLegendGraphic&VERSION=1.0.0&FORMAT=image/png&WIDTH=' + iconWidth + '&HEIGHT=' + iconHeight + '&LAYER=Cycle Stands',
> 
>              qtip: qtipTooltip
> 
>          },
> 
>           {
> 
>               nodeType: 'gx_layer',
> 
>               layer: "Barclays Hire Bike Stands",
> 
>               icon: wmsURL + 'REQUEST=GetLegendGraphic&VERSION=1.0.0&FORMAT=image/png&WIDTH=' + iconWidth + '&HEIGHT=' + iconHeight + '&LAYER=Barclays Hire Bike Stands',
> 
>               qtip: qtipTooltip
> 
>           },
> 
>             {
> 
>                 nodeType: 'gx_layer',
> 
>                 layer: "Controlled Parking Zones",
> 
>                 icon: wmsURL + 'REQUEST=GetLegendGraphic&VERSION=1.0.0&FORMAT=image/png&WIDTH=' + iconWidth + '&HEIGHT=' + iconHeight + '&LAYER=Controlled Parking Zones',
> 
>                 qtip: qtipTooltip
> 
> }]
> 
> }];
> 
> /*Layer Tree*/
> 
> //===================================================================
> 
> // create the tree with the configuration from above
> 
> var tree = new Ext.tree.TreePanel({
> 
>     border: true,
> 
>     region: "west",
> 
>     animate: true,
> 
>     applyTo: 'tablayers',
> 
>     height: 500,
> 
>     width: 350,
> 
>     enableDD: true,
> 
>     split: true,
> 
>     autoScroll: true,
> 
>     containerScroll: true,
> 
>     xtype: "gx_legendpanel",
> 
>     showWmsLegend: true,
> 
>     loader: new Ext.tree.TreeLoader({
> 
>         //clearOnLoad: true,
> 
>         // applyLoader has to be set to false to not interfer with loaders
> 
>         // of nodes further down the tree hierarchy
> 
>     applyLoader: false,
> 
>         uiProviders: {
> 
>                 "layernodeui": LayerNodeUI
> 
>             }
> 
>     }),
> 
>     root: {
> 
>         text: "Hackney Map Layers",
> 
>         nodeType: "async",
> 
>         children: treeConfig
> 
>     },
> 
>     rootVisible: true,
> 
>     lines: true
> 
> });
> 
> tree.getRootNode().expand();
> 
> }
> 
> 
> Any help or suggestions would be appreciated.
> 
> Thank you.
> 
> 
> 
> Anthony
> 
> 
> 
> 
> Hackney Council may exercise its right to intercept any communication, the only exception to this would be confidential survey data, with any employee or agent of the Council using its telephony or data networks.
> 
> By using these networks you give your consent to Hackney Council monitoring and recording your communication.
> 
> If you have received this e-mail in error please delete it immediately and contact the sender.For further information about Hackney Council policies please contact Hackney Service Centre on: 020 8356 3000
> 
> 
> **********************************************************************
> 
> London Borough of Hackney may exercise its right to intercept any communication on its networks - for more information see
> 
> http://www.hackney.gov.uk/email_disclaimer.html
> 
> ********************************************************************** 
> 
> This message has been scanned for malware by Websense. www.websense.com
> 
> _______________________________________________
> Users mailing list
> Users at geoext.org
> http://www.geoext.org/cgi-bin/mailman/listinfo/users

-- 
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.



More information about the Users mailing list