Skip to content

Commit 01484ac

Browse files
author
Damjan Gostencnik
committed
handle switched min & max X/Y
1 parent cd0b0b9 commit 01484ac

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/legacyCompat.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,9 @@ function bboxFromParams(service: ServiceType, version: string, crsAuthId: CRS_ID
304304
default:
305305
throw new Error('Unsupported CRS - bbox could not be parsed');
306306
}
307+
// SH services support switched min & max X/Y, but we don't:
308+
[minX, maxX] = [Math.min(minX, maxX), Math.max(minX, maxX)];
309+
[minY, maxY] = [Math.min(minY, maxY), Math.max(minY, maxY)];
307310
return new BBox(crs, minX, minY, maxX, maxY);
308311
}
309312

0 commit comments

Comments
 (0)