I'm new to openlayers and I've a map project created in qgis and served by 
qgis_mapserv.fcgi on linux system.  This should 
affect the openlayer part though.

I would like to display the overlays as vector layers.  The code below shows 
what I have now with the vector layers 
displayed as a WMS image layer.


SNIP---------
var map = new OpenLayers.Map('map',
                  {
            controls: [
            new OpenLayers.Control.Navigation(),
            new OpenLayers.Control.PanZoomBar(),
            new OpenLayers.Control.ScaleLine(),
            new OpenLayers.Control.MousePosition()
            ]
            },
            {
                                projection: new 
OpenLayers.Projection("EPSG:27700"),
                        }
            );

        var wms = new OpenLayers.Layer.WMS(
          "Base OS Map",
          "http://localhost/cgi-bin/mapserver/qgis_mapserv.fcgi";,
                {
                        map: '/var/www/cgi-bin/mapserver/web-test.qgs',
                        format: "png",
                        layers:['SN11', 'SN01']},
                        {       gutter:0,
                                projection: new 
OpenLayers.Projection("EPSG:27700"),
                                maxExtent: new OpenLayers.Bounds(200000, 
210000, 220000, 220000),
                                maxResolution: 2500,
                                minResolution: 1,opacity: 0.5,
                                units: 'm'
                        }
                );
    map.addLayer(wms);


        var rivers = new OpenLayers.Layer.WMS( "Rivers",
          "http://localhost/cgi-bin/mapserver/qgis_mapserv.fcgi";,
          { map: '/var/www/cgi-bin/mapserver/web-test.qgs',
                  format: "png",layers : 
['NaturalFeature_Line_11','NaturalFeature_Line_01'],
                  transparent: true, },
                  {
                        projection:  new OpenLayers.Projection("EPSG:27700"),
                        maxExtent: new OpenLayers.Bounds(200000, 210000, 
220000, 220000),
                        units: 'm',
                        maxResolution: 2500,
                        minResolution: 1,opacity: 1.0,
                        visibility: false,
                        }
          );
        map.addLayer(rivers);


        var wawo = new OpenLayers.Layer.WMS( "Water, woods etc.",
          "http://localhost/cgi-bin/mapserver/qgis_mapserv.fcgi";,
          { map: '/var/www/cgi-bin/mapserver/web-test.qgs',
                  format: "png",layers 
:['NaturalFeature_Area_11','NaturalFeature_Area_01'],
                  transparent: true},
                  {
                        projection:  new OpenLayers.Projection("EPSG:27700"),
                        maxExtent: new OpenLayers.Bounds(200000, 210000, 
220000, 220000),
                        units: 'm',
                        maxResolution: 2500,
                        minResolution: 1,
                        visibility: false,
                        opacity: 0.5
                        }
          );
        map.addLayer(wawo);

-----------SNIP

I would like the "Water, woods etc." and "Rivers" to be vector layers. I assume 
this is possible? Can anyone advice me how 
I can do this?  Reading the openlayers docs is un-enlightening and I can't find 
any examples anywhere.  Much time guessing 
the settings has got me nowhere, except to here obviously. 


Regards
Mike E


-- 
GPG Key: 1024D/050895C2
Keyserver: http://pgp.mit.edu/          
Search String: 0x050895C2
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to