[Users] Add all geoserver layers automatically
Valiquette,Francois [Montreal]
Francois.Valiquette at ec.gc.ca
Thu Apr 18 16:25:19 CEST 2013
Hello Chris,
Yes you can, you need to make a query on your server to get the GetCapabilities XML (a list of all the available layers and options).
The GeoExt.data.WMSCapabilitiesStore can make the query for you by giving it an URL. Then, it will return you a set of records. Afterward with the records, you can generate manually a Tree for a greater flexibility.
Otherwise, I think you can use GeoExt.tree.WMSCapabilitiesLoader to generate the Tree automatically for you.
Here is an exemple of a valid XML file :
http://api.geoext.org/1.1/examples/data/wmscap.xml
François
De : users-bounces at geoext.org [mailto:users-bounces at geoext.org] De la part de Christoph Mayrhofer
Envoyé : 18 avril 2013 10:05
À : users at geoext.org
Objet : [Users] Add all geoserver layers automatically
Hi,
I saw some examples that had a List of available layers and a button that you could click to add a selected layers to the map.
Is it possible to have all layers on a Geoserver instance automatically added to the map.
This would eliminate the need to change the JS code when a new layer is added to Geoserver.
regards, Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20130418/b05b5192/attachment.htm
More information about the Users
mailing list