File: WMSDescribeLayer.html

package info (click to toggle)
openlayers 2.11%2Bds1-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 60,144 kB
  • ctags: 10,906
  • sloc: xml: 7,435; python: 778; sh: 68; makefile: 30
file content (41 lines) | stat: -rw-r--r-- 1,144 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<html> 
<head> 
    <script src="../OLLoader.js"></script>
    <script type="text/javascript">
    
    function test_read_WMSDescribeLayer(t) {
        t.plan(5);
       
        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);

        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");

        t.eq(res[0].layerName, "topp:states",
            "Properly parses name");

    }

    </script> 
</head> 
<body>
</body> 
</html>