I serve WMS and WFS data using QGIS server and have a problem with projections. My project uses CRS EPSG:3857, the layers use CRS EPSG:4326.
Showing a WMS layer using Openlayers works fine. Tiles are called like that:
http://localhost/cgi-bin/project/qgis_mapserv.fcgi?map=/home/gerald/project.qgs&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image/png&TRANSPARENT=true&LAYERS=riversWithName&WIDTH=256&HEIGHT=256&CRS=EPSG:3857&STYLES=&BBOX=-469629.10178412125,4696291.017841229,-313086.06785608025,4852834.051769271
When I try to get the same layer as WFS data (based on this example from Openlayers) it doesn't work:
http://localhost/cgi-bin/project/qgis_mapserv.fcgi?map=/home/gerald/project.qgs&service=WFS&version=1.1.0&request=GetFeature&typename=riversWithName&outputFormat=GeoJSON&srsname=EPSG:3857&bbox=-469629.10178412125,4696291.017841229,-313086.06785608025,4852834.051769271,EPSG:3857
It expects the bounding box as EPSG:4326, the same call defining "projection: 4326 in the Openlayers view works fine and returns the features:
http://localhost/cgi-bin/project/qgis_mapserv.fcgi?map=/home/gerald/project.qgs&service=WFS&version=1.1.0&request=GetFeature&typename=riversWithName&outputFormat=GeoJSON&srsname=EPSG:3857&bbox=-2.94186767578125,38.78664566796875,6.51186767578125,44.06557633203125,EPSG:3857
What do I have to do to make it work with standard Openlayers projections 3857?
the same call defining "projection: 4326 in the Openlayers view works fine and returns the features:
but the example you give citessrsname=EPSG:3857
though the bounding box does look like they are degrees. Are you sure that it is working as expected?