Skip to content

Commit

Permalink
fix(wms): assign axis order param from source
Browse files Browse the repository at this point in the history
  • Loading branch information
airnez authored and Desplandis committed Dec 18, 2024
1 parent c975752 commit aec3ebf
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/Source/WMSSource.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,16 +102,16 @@ class WMSSource extends Source {
this.transparent = source.transparent || false;
this.bboxDigits = source.bboxDigits;

if (!source.axisOrder) {
// 4326 (lat/long) axis order depends on the WMS version used
if (this.crs == 'EPSG:4326') {
if (source.axisOrder) {
this.axisOrder = source.axisOrder;
} else if (this.crs == 'EPSG:4326') {
// 4326 (lat/long) axis order depends on the WMS version used
// EPSG 4326 x = lat, long = y
// version 1.X.X long/lat while version 1.3.0 mandates xy (so lat,long)
this.axisOrder = (this.version === '1.3.0' ? 'swne' : 'wsen');
} else {
this.axisOrder = this.version === '1.3.0' ? 'swne' : 'wsen';
} else {
// xy,xy order
this.axisOrder = 'wsen';
}
this.axisOrder = 'wsen';
}

const crsPropName = (this.version === '1.3.0') ? 'CRS' : 'SRS';
Expand Down

0 comments on commit aec3ebf

Please sign in to comment.