[OpenLayers-Users] WMS and WFS layers

bartvde at osgis.nl bartvde at osgis.nl
Thu Oct 29 09:10:07 EDT 2009


Hi,

don't use Layer.WFS anymore, use Layer.Vector with a WFS Protocol, please
check out the following OL example:

wfs-protocol.html

Best regards,
Bart

>
> Hi list,
> I have been using WMS layers served up by geoserver no problem up to now.
> I would like to try using WFS layers, but am having a little difficulty. I
> cant see what I am doing wrong.
> Can anyone spot anything wrong in what Im doing?
>
> This is what I use to set up a WMS layer:
>   // setup WMS layer
>                 statesWMS = new OpenLayers.Layer.WMS(
>                     "American states", "http://ncg.nuim.ie/geoserver/wms",
>                     {
>                         layers: 'states',
>                         styles: '',
>                         format: format,
>                         tiled: 'true',
>                         transparent: "true",
>                         tilesOrigin : "-127.61950064999999,23.7351786"
>                     },
>                     {buffer: 1}
>                 );
>
> This is what I use to set up a WFS layer:
> //setup WFS layer
>                  statesWFS = new OpenLayers.Layer.WFS(
>                  "States WFS",  "http://ncg.nuim.ie/geoserver/wfs",
>                     {
>                       typename: 'states',
>                       isBaseLayer: 'false',
>                       } );
>
> The WMS layer displays fine, but the WFS shows nothing, seems like just a
> transparent layer.
> I set up the datastore/coverage etc fine in Geoserver (I think) as the WMS
> gives no problems.
>
> The working example is here:
> http://www.eoinmaca.com/maps/OpenLayers/wmswfs.htm
>
> Any help greatly appreciated.
> Thanks,
>
> Eoinyp
>
> --
> View this message in context:
> http://n2.nabble.com/WMS-and-WFS-layers-tp3912168p3912168.html
> Sent from the OpenLayers Users mailing list archive at Nabble.com.
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>





More information about the Users mailing list