Added WMSDescribeLayer format. Thanks bartvde and sbenthall for the patch. I made some minor modifications:
* changed file structure to match other formats (i.e. put version 1.1 parser in a WMSDescribeLayer subfolder) * fixed a type in the example which showed owsURL instead of owsType r=me (closes #1201) git-svn-id: http://svn.openlayers.org/trunk/openlayers@9146 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
40
tests/Format/WMSDescribeLayer.html
Normal file
40
tests/Format/WMSDescribeLayer.html
Normal file
@@ -0,0 +1,40 @@
|
||||
<html>
|
||||
<head>
|
||||
<script src="../../lib/OpenLayers.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
function test_read_WMSDescribeLayer(t) {
|
||||
t.plan(4);
|
||||
|
||||
var parser = new OpenLayers.Format.WMSDescribeLayer();
|
||||
|
||||
var text =
|
||||
'<WMS_DescribeLayerResponse version="1.1.1">' +
|
||||
' <LayerDescription name="topp:states" wfs="http://geo.openplans.org:80/geoserver/wfs/WfsDispatcher?">' +
|
||||
' <Query typeName="topp:states"/>' +
|
||||
' </LayerDescription>' +
|
||||
'</WMS_DescribeLayerResponse>';
|
||||
|
||||
var res = parser.read(text);
|
||||
|
||||
console.log(res);
|
||||
|
||||
t.eq(res.length, 1,
|
||||
"Only one LayerDescription in data, so only one parsed");
|
||||
|
||||
t.eq(res[0].owsType, "WFS",
|
||||
"Properly parses owsType as WFS");
|
||||
|
||||
t.eq(res[0].owsURL, "http://geo.openplans.org:80/geoserver/wfs/WfsDispatcher?",
|
||||
"Properly parses owsURL");
|
||||
|
||||
t.eq(res[0].typeName, "topp:states",
|
||||
"Properly parses typeName");
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
</body>
|
||||
</html>
|
||||
@@ -59,6 +59,7 @@
|
||||
<li>Format/Filter/v1_0_0.html</li>
|
||||
<li>Format/Filter/v1_1_0.html</li>
|
||||
<li>Format/WFSDescribeFeatureType.html</li>
|
||||
<li>Format/WMSDescribeLayer.html</li>
|
||||
<li>Format/WFS.html</li>
|
||||
<li>Format/WFST.html</li>
|
||||
<li>Format/WFST/v1.html</li>
|
||||
|
||||
Reference in New Issue
Block a user