[OpenLayers-Users] WFS GetFeature

Eric Lemoine eric.lemoine at camptocamp.com
Thu Nov 19 01:48:50 EST 2009


On Wednesday, November 18, 2009, stash <steffen.schwarz85 at googlemail.com> wrote:
>
> Hello,
> I have a openlayers map with a wms showing some points. Furthermore a wms
> getfeatureinfo returns some infos when the user is clicking on a point on
> the map. Thereby the wms getfeatureinfo returns a "application/vnd.ogc.gml".
> Afterwards i parse my gml and the user gets the parsed info.
>
> What I want to add now is, that the user only getting some info, when
> certain points are clicked (for example: only when point 2 or 3 is clicked).
>
> I think this is only possible when i replace my wms getfeatureinfo with a
> wfs getfeature + a filter.
>
> Am I right with this thought? The wfs should also return a gml what I can
> parse then.
>
> I hope someone can help me (maybe with an easy example of a wfs getfeature
> request + filter) because I have not so much experience with openlayers.

Hi

look at the getfeature-wfs.html to know how to use the GetFeature
control. And based on what you describe above I think what you want is
a default filter set in the protocol, this default filter will be
composed of mutiple FeatureId filters combined in an OR logical
filter. IIRC the defaultFilter property in OpenLayers.Protocol isn't
in 2.8, but in trunk.

cheers,

-- 
Eric Lemoine

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex

Tel : 00 33 4 79 44 44 96
Mail : eric.lemoine at camptocamp.com
http://www.camptocamp.com



More information about the Users mailing list