[OpenLayers-Users] Using getFeatureInfo on a vector (WFS) layer in openLayers

Ian Turton ijturton at gmail.com
Wed Sep 1 11:03:39 EDT 2010


On Wed, Sep 1, 2010 at 12:09 AM, Joe Public <joepub1962 at gmail.com> wrote:
>
> Hey OL....
> I'm trying display the data associated with a feature (point) in a vector
> (WFS) layer using the script below
> When I click on the feature I get the message:
> No QUERY_LAYERS has been requested, or no queriable layer in the request
> anyways
>

You can't use getFeatureInfo against a WFS as it is a WMS request. You
would need to use a GetFeature request against the WFS. Look at the
demo requests provided by GeoServer to see the differences. Or
http://dev.openlayers.org/releases/OpenLayers-2.9.1/examples/getfeature-wfs.html
for a working OpenLayers example.

Ian

-- 
Ian Turton



More information about the Users mailing list