[Featureserver] Displaying a ogr or postgis datasource as a layer
    David Creane 
    dc at openapp.ie
       
    Thu Oct  4 11:32:17 EDT 2007
    
    
  
yes apoligies, in my endevour to see what the code was actually doing i
had forgot to undo changes to the code. So now format=wfs returns as gml.
I didnt know what the difference was between them before now. Thanks.
Ive been trying to debug it all day to see where it was going wrong and i
realised, again, that i wasnt passing the correct values to the layer.
this works
var eireBaseOptions = {
  visibility:true,
  numZoomLevels: 10,
  projection:"EPSG:29900",
  maxExtent: bounds,
  units:"m",
  maxResolution: 1469.5546875,
  isBaseLayer: true };
var eireOptions = {
  visibility:true,
  numZoomLevels: 10,
  projection:"EPSG:29900",
  maxExtent: bounds,
  units:"m",
  maxResolution: 1469.5546875,
  isBaseLayer: false };
function init(){
map = new OpenLayers.Map('map', mapParams, mapOptions);
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://localhost/~dave/tilecache/tilecache.cgi?", {layers:
'ireland_coast_permanent',format: 'image/png'}, eireBaseOptions );
map.addLayer(layer);
layer2 = new OpenLayers.Layer.WFS( "Test",
"http://localhost/~dave/featureserver/featureserver.cgi/hospital?format=WFS",
{ maxfeatures: 2},  eireOptions);
map.addLayer(layer2);
map.addControl(new OpenLayers.Control.LayerSwitcher());
map.zoomToMaxExtent();
        }
Apoligies again, your probably sick of these stupid qestions :) .
Thanks for the help.
Dave
    
    
More information about the Featureserver
mailing list