I have a WMS layer which have a different axis-orientation to the one that OpenLayers sends out in the BBOX-request.
Openlayers uses the BBOX (minx,miny,maxx,maxy): BBOX=1438239.124213878%2C7895639.273745567%2C1448023.0638343806%2C7905423.213366069
But to get my map-tiles I have to swap the axis-order to this (miny,minx,maxy,maxy):
BBOX=7895639.273745567%2C1438239.124213878%2C7905423.213366069%2C1448023.0638343806
The x and y should change order in the request. Is there any simple solution to this?
I´ve tried to read other questions, but most requests is to change the coordinate system, which I´m not interested in.
Also, the same question I have is posted here: How change axis/coordinates/xy order for a particular layer in a Map?
But that is referring to OpenLayers 2.
Best Answer
So does WMS version 1.3.0:
And indeed WMS 1.1.1:
The difference between the two standards is not the order of the x,y in the request, it's the potential difference between the definition of which axis (Easting/Northing, Latitude/Longitude, ...) constitutes x or y.
In WMS 1.1.1 the axis order is set as X=longitude (easting) and Y=latitude (northing), even if the actual axis order specified in the coordinate reference system is the other way around... In WMS 1.3.0 the axis order is specified according to the coordinate reference system definition.
So...
urn:ogc:def:crs:EPSG::3857 defines its axes as first axis "easting (X)" and second axis "northing (Y)"
Assuming you are using EPSG::3857, there should be no difference to your application if you use a WMS 1.1.1 or WMS 1.3.0.
Assuming OpenLayers is expecting x=Longitude/Easting, and you are using EPSG::3857, then if your data is displaying in the wrong location, the issue is with the WMS.