Hi,

what version of GeoExt are you using? Please upgrade to 1.1 if you're not 
running it already.

This was fixed with: http://trac.geoext.org/ticket/451

Best regards,
Bart

-- 
Bart van den Eijnden
OpenGeo - http://opengeo.org
Expert service straight from the developers.



On Mar 5, 2012, at 5:12 PM, frank wrote:

> Dear list
> 
> I'm using a self-made function for clearing all layers in my map and adding a 
> stored set of predefined layers.
> In this routine i call map.removeLayer() for all non-base layers, before I 
> add the new layer set.
> 
> However, after having removed the layers I get an exception from 
> GeoExt.VectorLegend:
> Uncaught TypeError: Cannot read property 'map' of null
> GeoExt.VectorLegend.Ext.extend.onMapZoomVectorLegend.js:261
> OpenLayers.Events.OpenLayers.Class.triggerEventEvents.js:798
> OpenLayers.Map.OpenLayers.Class.moveToMap.js:1890
> OpenLayers.Map.OpenLayers.Class.setCenterMap.js:1662
> OpenLayers.Control.Navigation.OpenLayers.Class.wheelChangeNavigation.js:279
> OpenLayers.Control.Navigation.OpenLayers.Class.wheelDownNavigation.js:303
> OpenLayers.Handler.OpenLayers.Class.callbackHandler.js:205
> OpenLayers.Handler.MouseWheel.OpenLayers.Class.wheelZoomMouseWheel.js:229
> OpenLayers.Handler.MouseWheel.OpenLayers.Class.onWheelEventMouseWheel.js:191
> (anonymous function)
> To the inner level this maps down to the function
>     onMapZoom: function() {
>             this.setCurrentScaleDenominator(
>                 this.layer.map.getScale()
>             );
>     },
> And by inspection this.layer is undefined.
> How can this be?
> Removing the layer with any combination of (one or both)
>     map.removeLayer(layer) and
>     layer.destroy()
> gives the same result.
> best regards,
> Frank
> 
> 
> _______________________________________________
> Users mailing list
> Users@geoext.org
> http://www.geoext.org/cgi-bin/mailman/listinfo/users

_______________________________________________
Users mailing list
Users@geoext.org
http://www.geoext.org/cgi-bin/mailman/listinfo/users

Reply via email to