Hello Andreas,
Thank you for your thoughts. However, I don't think your suggestion will
work in my case. I am not trying to merge different feature types from
one WFS, but the same feature type from different WFSes.
Regards,
Frans
On 2010-09-23 9:41, Andreas Hocevar wrote:
Hi,
configure your WFS protocol with multiple feature types. Look e.g. at the wfs-states.js example. If
you wanted "states" and "world" from the WFS, you would configure it like this:
var wfs = new OpenLayers.Layer.Vector("States", {
strategies: [new OpenLayers.Strategy.BBOX()],
protocol: new OpenLayers.Protocol.WFS({
url: "http://demo.opengeo.org/geoserver/wfs",
featureType: ["states", "world"],
featureNS: "http://www.openplans.org/topp"
})
});
Regards,
Andreas.
On Sep 22, 2010, at 18:38 , Frans Knibbe wrote:
Hello everybody,
I have several vector layers that have similar data structures (in fact they
are WFS layers using the same application schemas). I would like to merge these
layers into one layer. I want to do this because I want to use a
GeoExt.data.FeatureStore to be able to display a table with feature data that
are coupled with the features in the map. So I think I want to use only the
merged layer in my map.
I am looking for help on the best way to merge my vector layers. Looking at the
OpenLayers documentation, I see that I could use the addFeatures function to add features
to the merged layer. But when could I call this function if I never draw the layers that
will be merged? On the other hand, I see there is a
OpenLayers.Layer.Vector.RootContainer. It is something that can be used to combine vector
layers but it is "not supposed to be instantiated from user space".
Any help, tips, examples or hints will be greatly appreciated!
Greetings,
Frans
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users