HSLayers.OWS

HSLayers.OWS is basic class for WMS, WFS and in the future possibly others OGC Web Services clients.

You can use it either as one complex OWS panel or as WMS or WFS client only, see example at http://dev.bnhelp.cz/wwwlibs/hslayers/branches/editace/examples/OWS.html

Fore easier usage, we exposed HSLayers.OWSPanel() function, which creates Ext.Panel containing everything.

Using HSLayers.OWSPanel

First the JavaScript files

1
2
3
        <script type="text/javascript" src="../source/HSLayers/OWS.js"></script>
        <script type="text/javascript" src="../source/HSLayers/OWS/WMS.js"></script>
        <script type="text/javascript" src="../source/HSLayers/OWS/WFS.js"></script>

Now the code

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
            var owsPanel = new HSLayers.OWSPanel();
            // put everything to one panel, so we ca switch between the
            // particular clients
            var owsTools = new Ext.Panel({
                layout: "accordion",
                renderTo: Ext.get("ows"),
                height: 550,
                items: [owsPanel,wmsPanel, wfsPanel]
                });
            owsPanel.setMap(map);

In above example, we created some Ext.Panel, and in this panel OWSPanel was included (together with WMS and WFS panels - we will talk about them later).

Now you should get WMS and WFS clients, which are able to add new layers to your map.

Using HSLayers.OWS.WMS and HSLayers.OWS.WFS

The usage of both panels is similar to the comprehensive OWS panel:

1
2
3
4
            var wmsPanel = new HSLayers.OWS.WMS();
            var wfsPanel = new HSLayers.OWS.WFS();
            wmsPanel.setMap(map);
            wfsPanel.setMap(map);

This will create 2 independent panels, one with WMS and second with WFS client, again see the example.

Table Of Contents

Previous topic

HSLayers.InfoPanel

Next topic

HSLayers.Printer

This Page