@loaders.gl/wms
Advanced tools
Comparing version 4.0.4 to 4.0.5
@@ -48,3 +48,11 @@ import { ImageLoader } from '@loaders.gl/images'; | ||
async getImage(parameters) { | ||
return await this.getMap(parameters); | ||
const { | ||
boundingBox, | ||
...rest | ||
} = parameters; | ||
const wmsParameters = { | ||
bbox: [...boundingBox[0], ...boundingBox[1]], | ||
...rest | ||
}; | ||
return await this.getMap(wmsParameters); | ||
} | ||
@@ -213,10 +221,2 @@ normalizeMetadata(capabilities) { | ||
break; | ||
case 'boundingBox': | ||
const boundingBox = value; | ||
let bbox2 = [...boundingBox[0], ...boundingBox[1]]; | ||
bbox2 = this._flipBoundingBox(boundingBox, wmsParameters); | ||
if (bbox2) { | ||
value = bbox2; | ||
} | ||
break; | ||
case 'bbox': | ||
@@ -223,0 +223,0 @@ const bbox = this._flipBoundingBox(value, wmsParameters); |
{ | ||
"name": "@loaders.gl/wms", | ||
"version": "4.0.4", | ||
"version": "4.0.5", | ||
"description": "Framework-independent loaders for the WMS (Web Map Service) standard", | ||
@@ -54,10 +54,10 @@ "license": "MIT", | ||
"@babel/runtime": "^7.3.1", | ||
"@loaders.gl/images": "4.0.4", | ||
"@loaders.gl/loader-utils": "4.0.4", | ||
"@loaders.gl/schema": "4.0.4", | ||
"@loaders.gl/xml": "4.0.4", | ||
"@loaders.gl/images": "4.0.5", | ||
"@loaders.gl/loader-utils": "4.0.5", | ||
"@loaders.gl/schema": "4.0.5", | ||
"@loaders.gl/xml": "4.0.5", | ||
"@turf/rewind": "^5.1.5", | ||
"deep-strict-equal": "^0.2.0" | ||
}, | ||
"gitHead": "4dc810fa04bb400f4aedfef98a83c7ef882ed3d7" | ||
"gitHead": "9cc48b95bdad8842ebfd9a19f487c534f32526e9" | ||
} |
@@ -237,4 +237,9 @@ // loaders.gl, MIT license | ||
async getImage(parameters: GetImageParameters): Promise<ImageType> { | ||
// @ts-expect-error | ||
return await this.getMap(parameters); | ||
// Replace the GetImage `boundingBox` parameter with the WMS flat `bbox` parameter. | ||
const {boundingBox, ...rest} = parameters; | ||
const wmsParameters: WMSGetMapParameters = { | ||
bbox: [...boundingBox[0], ...boundingBox[1]], | ||
...rest | ||
}; | ||
return await this.getMap(wmsParameters); | ||
} | ||
@@ -502,12 +507,2 @@ | ||
case 'boundingBox': | ||
// Coordinate order is flipped for certain CRS in WMS 1.3.0 | ||
const boundingBox = value as [[number, number], [number, number]]; | ||
let bbox2: number[] | null = [...boundingBox[0], ...boundingBox[1]]; | ||
bbox2 = this._flipBoundingBox(boundingBox, wmsParameters); | ||
if (bbox2) { | ||
value = bbox2; | ||
} | ||
break; | ||
case 'bbox': | ||
@@ -514,0 +509,0 @@ // Coordinate order is flipped for certain CRS in WMS 1.3.0 |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
571268
7953
+ Added@loaders.gl/images@4.0.5(transitive)
+ Added@loaders.gl/loader-utils@4.0.5(transitive)
+ Added@loaders.gl/schema@4.0.5(transitive)
+ Added@loaders.gl/worker-utils@4.0.5(transitive)
+ Added@loaders.gl/xml@4.0.5(transitive)
- Removed@loaders.gl/images@4.0.4(transitive)
- Removed@loaders.gl/loader-utils@4.0.4(transitive)
- Removed@loaders.gl/schema@4.0.4(transitive)
- Removed@loaders.gl/worker-utils@4.0.4(transitive)
- Removed@loaders.gl/xml@4.0.4(transitive)
Updated@loaders.gl/images@4.0.5
Updated@loaders.gl/schema@4.0.5
Updated@loaders.gl/xml@4.0.5