On Sat, Jan 29, 2011 at 1:55 PM, Eric Lemoine
<[email protected]> wrote:
> On Fri, Jan 28, 2011 at 4:51 PM, Alex Dean <[email protected]> wrote:
>> Hello.  I'm going through this tutorial using my local GeoServer 
>> installation.  I am using GeoExt 1.0, OpenLayers 2.10, and ext.js 3.2.1.
>> http://workshops.opengeo.org/geoext/wfs/layer.html
>>
>> Code looks like this thusfar: http://pastie.org/1506095  It's the same as 
>> the example, with modifications to retrieve local data.
>>
>> Everything works as expected until I attempt to add 'sm: new 
>> GeoExt.grid.FeatureSelectionModel()' to my GridPanel.
>>
>> When I do that, I receive the error: "layer.map is null", in reference to 
>> "layer.map.addControl(selectControl)" on line 153 of 
>> FeatureSelectionModel.js.  If I remove this code, the map & grid render 
>> correctly.
>>
>> This seems similar to the problem reported in https://geoext.org/ticket/396
>
> It is.
>
>> but I am wondering if there is some other explanation.
>
> The feature selection model fails to add its select feature control to
> the map, because the vector layer hasn't been added to the map yet (so
> layer.map is null). This whole issue comes from the fact that we
> differ adding the layers to the map in the map panel.

Please read "defer" instead of "differ". Sorry :-)

-- 
Eric Lemoine

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex

Tel : 00 33 4 79 44 44 96
Mail : [email protected]
http://www.camptocamp.com
_______________________________________________
Users mailing list
[email protected]
http://www.geoext.org/cgi-bin/mailman/listinfo/users

Reply via email to