<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body text="#000000" bgcolor="#ffffff">
Hello all,<br>
<br>
I'm trying to use WFS 2.0.0 instead of my current WFS 1.0.0 for an
OpenLayers application. I have GeoServer 2.2.2 for my services, and
OL 2.11.<br>
My vector layer is a WFS with a BBX strategy, the JS code is the one
below :<br>
<br>
new OpenLayers.Layer.Vector('Vessels WFS',
<br>
{
<br>
styleMap: styleVess,
<br>
strategies: [new OpenLayers.Strategy.BBOX()],
<br>
protocol: new OpenLayers.Protocol.HTTP({
<br>
url: local_wfs,
<br>
params: {
<br>
typename: 'oneday',
<br>
service: 'WFS',
<br>
version: '1.0.0',
<br>
request: 'GetFeature',
<br>
srs: 'EPSG:4326'
<br>
},
<br>
format: new OpenLayers.Format.GML()
<br>
}),
<br>
inLegend: true,
<br>
visibility: false
<br>
}, {
<br>
extractAttributes: true
<br>
}
<br>
)<br>
<br>
This produce a GET with this kind of URL :
<a class="moz-txt-link-freetext" href="http://myhost/wfs?typename=oneday&service=WFS&version=1.0.0&request=GetFeature&srs=EPSG:4326&format=WFS&bbox=4.4653930664063,42.354064941405,10.562805175781,44.293151855469">http://myhost/wfs?typename=oneday&service=WFS&version=1.0.0&request=GetFeature&srs=EPSG:4326&format=WFS&bbox=4.4653930664063,42.354064941405,10.562805175781,44.293151855469</a><br>
<br>
Ok, that works fine. But when I want to use WFS 2.0.0, it doesn't
work anymore because of the axis order that is reversed
(<a class="moz-txt-link-freetext" href="http://docs.geoserver.org/latest/en/user/services/wfs/basics.html#axis-ordering">http://docs.geoserver.org/latest/en/user/services/wfs/basics.html#axis-ordering</a>).<br>
<br>
I read in a post that adding ",EPSG:4326" at the end of the BBOX
parameter in the URL fixes the thing. It's true, I can do it "with
the hand" in my web browser. But the BBOX is automatically created
by the OL BBOX Strategy, so I can't add the extra comma in the JS
parameters.<br>
<br>
Does anyone have an idea on how to fix this ? Thank you, and happy
new year ! :)<br>
<br>
Gabriel<br>
<br>
<div class="moz-signature">-- <br>
<p>Gabriel Vatin</p>
Doctorant en géomatique / PhD Student in Geomatics<br>
MINES ParisTech<br>
Centre de recherche sur les Risques et les Crises (CRC)<br>
CS 10207<br>
06904 Sophia-Antipolis Cedex - France<br>
Tél : + 33(0)4.93.95.75.77<br>
Fax : + 33(0)4.93.95.75.81<br>
E-mail : <a href="mailto:gabriel.vatin@mines-paristech.fr">gabriel.vatin@mines-paristech.fr</a><br>
Internet : <a href="http://www.crc.mines-paristech.fr/ssem">http://www.crc.mines-paristech.fr/ssem</a>
</div>
</body>
</html>