[Users] FeatureStore with features from multiple layers
Andreas Hocevar
ahocevar at opengeo.org
Thu Sep 23 09:04:49 CEST 2010
Hi,
note that your merging approach will only work if the features of all your layers have the same attribute fields.
For the merging itself, if you use WFS, it will be enough to configure the WFS protocol of your vector layer with a list of feature types.
Synchronisation between GeoExt.data.FeatureStore and features only works with one layer, because the store has to listen to events of the layer. However, it should be easy to create an Ext.data.Store instance with GeoExt.data.FeatureRecord records and keep it in sync with multiple layers by just registering the appropriate event handlers on all layers (featuresadded, featuresremoved, featuremodified) and the store (load, clear, add, remove, update).
Hope this helps,
Andreas.
On Sep 22, 2010, at 17:17 , Frans Knibbe wrote:
> Hello,
>
> I am really having trouble getting this to work. My idea was to create a
> GeoExt.data.FeatureStore using the 'features' configuration option
> instead of the 'layers' option, with the features being a concatenated
> array of features from multiple layers. But that only works when the
> store is created. I want to have the store synchronized with the
> features on the map. I could not find a way to change the data in the
> FeatureStore when it is not coupled with a layer.
>
> So now I want to try creating a merged layer in OpenLayers and use that
> in the FeatureStore...
>
> Regards,
> Frans
>
>
> On 2010-09-14 15:22, Frans Knibbe wrote:
>> On 2010-09-08 15:55, "Michael Prieß" wrote:
>>> Hello Frans,
>>>
>>> have you found a solution to sync a GeoExt.data.FeatureStore with multiple layers ?
>> Not yet, I got distracted by other matters. But I will report my
>> findings in this list.
>>> Regards,
>>>
>>> Michael Prieß
>>>
>>> -------- Original-Nachricht --------
>>>> Datum: Tue, 31 Aug 2010 17:26:25 +0200
>>>> Von: Frans Knibbe<frans at geodan.nl>
>>>> An: "users at geoext.org"<users at geoext.org>
>>>> Betreff: [Users] FeatureStore with features from multiple layers
>>>> Hello all,
>>>>
>>>> I would like to have a Ext.grid.GridPanel displaying data from multiple
>>>> WFS layers. I know these WFS use the same schema, so there should be no
>>>> conflict in data definitions. To populate the GridPanel I guess I need a
>>>> GeoExt.data.FeatureStore. Is it possible to populate a FeatureStore with
>>>> data from multiple vector layers? If so, how would I go about doing that?
>>>>
>>>> Thanks,
>>>> Frans
>>>>
>>>>
>>>> _______________________________________________
>>>> Users mailing list
>>>> Users at geoext.org
>>>> http://www.geoext.org/cgi-bin/mailman/listinfo/users
>>
>>
>> _______________________________________________
>> Users mailing list
>> Users at geoext.org
>> http://www.geoext.org/cgi-bin/mailman/listinfo/users
>
>
>
> _______________________________________________
> 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