© Pedro Pereira Gonçalves (pedro@inovagis.org)

Project quickWMS: Generic JavaScript WMS Client
Example : multiple layer request example according to OpenGIS Web Mapping Specification using quickWMS class, together with a simple auxiliary navigation window (using the navWMS class)
Author : Pedro Pereira Gonçalves (pedro@inovagis.org)
Version : 0.01
Last Change : 2003-10-27
Tested on : Netscape 7.0 and 7.1,
Mozilla 1.4.1, IE 6.0









Source Code

    <script language='Javascript'>

    // WMS servers - list here other OGC compliant map servers
    // Changes: 2003-10-24 : Added http:// to the DEMIS and ESRIN server urls
    var demisWMS
    = "http://www.demis.nl/mapserver/request.asp";
    var esaWMS = "http://mapserv2.esrin.esa.it/cubestor/cubeserv/cubeserv.cgi";

    function writeMaps(){

    var map = new mapWMS(-180,-90,180,90);
    map.addLayer(esaWMS, "WORLD_MODIS_1KM:MapAdmin");
    map.addLayer(demisWMS, "Coastlines");
    map.layers[0].
    format="JPEG";
    map.writeDOM("myMap", 350, 226, 400, 200, "background-color:white; border-style:solid; border-width:1; border-color:black;");
    map.toolbar = new toolBar(map);
    map.toolbar.writeDOM(350, 170, true);

    // add a navigation window
    var nav = new navigationWMS(mapWMS, -180,-90,180,90);
    nav.addLayer(demisWMS, "Coastlines,Builtup+areas", "1.0.0", "Coastlines");
    nav.writeDOM("myNavMap", map.left-205, map.top+40, 200, 100, "background-color:white; border-style:solid; border-width:1; border-color:black;");
    nav.addListener(map);

    nav.refresh();
    map.updateBBox (-20, 20, 60, 60) ;

    }
    writeMaps();
    </script>