[Users] FeatureStore unbinding

Denis Rykov rykovd at gmail.com
Fri May 27 16:47:41 CEST 2011


Matt, thanks for full answer!
A little workaround for my problem, maybe useful for anyone:

store.unbind();
store.removeAll();
store.bind(layer2);
gridPanel.getSelectionModel().unbind();
gridPanel.getSelectionModel().bind(layer2);

On Fri, May 27, 2011 at 8:22 PM, Matt Priour <mpriour at kestrelcomputer.com>wrote:

>  There may or may not be a way to unbind/rebind a layer to a feature
> store. However, the unbind/bind functions are internal functions that
> register and unregister event listeners.
> However, the GeoExt pattern of doing things really expects a single layer
> to feature store relation. Doing otherwise is going to cause you to jump
> through many more hoops and monkey patch various bits of code.
> Grids and data views have methods to reconfigure the view with a new store,
> field definitions, or both. Any visualization you would be using a feature
> store with will able to handle switching the store much easier than changing
> the layer attached to the store.
> Matt Priour
> Kestrel Computer Consulting
>
>  *From:* Denis Rykov <rykovd at gmail.com>
> *Sent:* Friday, May 27, 2011 5:48 AM
> *To:* Users at geoext.org
> *Subject:* [Users] FeatureStore unbinding
>
> Hi!
>
> Please help me with the following problem. Little testcase:
>
> 1) There are two layers on map (e.g., layer1 and layer2);
> 2) FeatureStore (store) binded to layer1;
> 3) After loading map try to perform:
> store.unbind()
> store.bind(layer2)
>
> Features of both layers takes layer2 style! Is it bug?
>
> What is the right way to unbin store from one layer and bind it to another?
> Big thanks.
>
> ------------------------------
>
> _______________________________________________
> Users mailing list
> Users at geoext.org
> http://www.geoext.org/cgi-bin/mailman/listinfo/users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20110527/155a8a5c/attachment.htm 


More information about the Users mailing list