Hi,
Use WFSCapabilities format instead [1]:
wfsParser = new OpenLayers.Format.WFSCapabilities();
wfsCapabilities = wfsParser.read(response.responseText);
wfsCapabilities.featureTypeList.featureTypes
[1]http://dev.openlayers.org/releases/OpenLayers-2.8/doc/apidocs/files/OpenLayers/Format/WFSCapabilities-js.html
Best regards,
Gabriel Nolasco
Message: 6
Date: Wed, 3 Feb 2010 02:56:44 -0800 (PST)
From: Henry Rotzoll <[email protected]>
Subject: [OpenLayers-Users] Read WFS capabilities file
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii
Hi there,
Does anybody know how to access the layers from a WFS capabilities file?
I have this code:
var XMLformat = new OpenLayers.Format.XML();
var xml = XMLformat.read(responseText);
--> "responseText" ist the returned WFS capabilities file from the server
var CAPformat = new OpenLayers.Format.WFSCapabilities();
var cap = CAPformat.read(xml);
"cap" is an object, not null, but I can't access it like in the WMS
Capabilities case (e. g. cap.capability.layers[i]). JavaScript says it's
undefined.
Thanks in advance!
Best regards,
Henry
____________________________________________________________________________________
Veja quais são os assuntos do momento no Yahoo! +Buscados
http://br.maisbuscados.yahoo.com_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users