[GIS] How to do a WFS version 2.0.0 GetFeature request with OL3

getfeatureopenlayerswfs

How to obtain information about the feature WFS layer in different versions of WFS 1.0.0 / 1.1.0 / 2.0.0 ?

The OL documentation says

Feature format for reading and writing data in the WFS format. By default, supports WFS version 1.1.0. You can pass a GML format as option if you want to read a WFS that contains GML2 (WFS 1.0.0). Also see ol.format.GMLBase which is used by this format.

Ok, example WFS – GetFeature is performed in the version 1.1.0

var f = ol.format.ogc.filter;
var wfs = new ol.format.WFS();
wfs.writeGetFeature({
    srsName: 'EPSG:3857',
    featureNS: 'http://openstreemap.org',
    featurePrefix: 'osm',
    featureTypes: ['water_areas'],
    outputFormat: 'application/json',
    filter: f.and(
        f.like('name', 'Mississippi*'),
        f.equalTo('waterway', 'riverbank')
    )
}); 

But it always forms a request in WFS version 1.1.0.
How to form GetFeature request in WFS versions 2.0.0 using writeGetFeature function?

Best Answer

A question on the OL3 developers forum, from June 2014, tells us that whilst there is support for WFS 2 in OL 2, there is no such support for WFS 2 in OL3!

WFS / GML versioning support

Related Question