@loaders.gl/wms 3.4.0-alpha.5 → 3.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dist.min.js +6 -1
- package/dist/es5/csw-capabilities-loader.js +1 -1
- package/dist/es5/csw-capabilities-loader.js.map +1 -1
- package/dist/es5/csw-domain-loader.js +1 -1
- package/dist/es5/csw-domain-loader.js.map +1 -1
- package/dist/es5/csw-records-loader.js +1 -1
- package/dist/es5/csw-records-loader.js.map +1 -1
- package/dist/es5/gml-loader.js +1 -1
- package/dist/es5/gml-loader.js.map +1 -1
- package/dist/es5/lerc-loader.js +1 -1
- package/dist/es5/lerc-loader.js.map +1 -1
- package/dist/es5/lib/services/ogc/csw-service.js.map +1 -1
- package/dist/es5/lib/services/ogc/wms-service.js +7 -2
- package/dist/es5/lib/services/ogc/wms-service.js.map +1 -1
- package/dist/es5/wip/wcs-capabilities-loader.js +1 -1
- package/dist/es5/wip/wcs-capabilities-loader.js.map +1 -1
- package/dist/es5/wip/wfs-capabilities-loader.js +1 -1
- package/dist/es5/wip/wfs-capabilities-loader.js.map +1 -1
- package/dist/es5/wip/wmts-capabilities-loader.js +1 -1
- package/dist/es5/wip/wmts-capabilities-loader.js.map +1 -1
- package/dist/es5/wms-capabilities-loader.js +1 -1
- package/dist/es5/wms-capabilities-loader.js.map +1 -1
- package/dist/es5/wms-error-loader.js +1 -1
- package/dist/es5/wms-error-loader.js.map +1 -1
- package/dist/esm/csw-capabilities-loader.js +1 -1
- package/dist/esm/csw-capabilities-loader.js.map +1 -1
- package/dist/esm/csw-domain-loader.js +1 -1
- package/dist/esm/csw-domain-loader.js.map +1 -1
- package/dist/esm/csw-records-loader.js +1 -1
- package/dist/esm/csw-records-loader.js.map +1 -1
- package/dist/esm/gml-loader.js +1 -1
- package/dist/esm/gml-loader.js.map +1 -1
- package/dist/esm/lerc-loader.js +1 -1
- package/dist/esm/lerc-loader.js.map +1 -1
- package/dist/esm/lib/services/ogc/csw-service.js.map +1 -1
- package/dist/esm/lib/services/ogc/wms-service.js +6 -1
- package/dist/esm/lib/services/ogc/wms-service.js.map +1 -1
- package/dist/esm/wip/wcs-capabilities-loader.js +1 -1
- package/dist/esm/wip/wcs-capabilities-loader.js.map +1 -1
- package/dist/esm/wip/wfs-capabilities-loader.js +1 -1
- package/dist/esm/wip/wfs-capabilities-loader.js.map +1 -1
- package/dist/esm/wip/wmts-capabilities-loader.js +1 -1
- package/dist/esm/wip/wmts-capabilities-loader.js.map +1 -1
- package/dist/esm/wms-capabilities-loader.js +1 -1
- package/dist/esm/wms-capabilities-loader.js.map +1 -1
- package/dist/esm/wms-error-loader.js +1 -1
- package/dist/esm/wms-error-loader.js.map +1 -1
- package/dist/lib/services/ogc/csw-service.d.ts +5 -3
- package/dist/lib/services/ogc/csw-service.d.ts.map +1 -1
- package/dist/lib/services/ogc/csw-service.js +1 -2
- package/dist/lib/services/ogc/wms-service.d.ts +10 -2
- package/dist/lib/services/ogc/wms-service.d.ts.map +1 -1
- package/dist/lib/services/ogc/wms-service.js +6 -1
- package/package.json +6 -6
- package/src/lib/services/ogc/csw-service.ts +12 -4
- package/src/lib/services/ogc/wms-service.ts +16 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { parseWFSCapabilities } from './lib/wfs/parse-wfs-capabilities';
|
|
2
|
-
const VERSION = typeof "3.4.
|
|
2
|
+
const VERSION = typeof "3.4.1" !== 'undefined' ? "3.4.1" : 'latest';
|
|
3
3
|
export const WFSCapabilitiesLoader = {
|
|
4
4
|
id: 'wfs-capabilities',
|
|
5
5
|
name: 'WFS Capabilities',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wfs-capabilities-loader.js","names":["parseWFSCapabilities","VERSION","WFSCapabilitiesLoader","id","name","module","version","worker","extensions","mimeTypes","testText","testXMLFile","options","wms","parse","arrayBuffer","TextDecoder","decode","parseTextSync","text","startsWith","_typecheckWFSCapabilitiesLoader"],"sources":["../../../src/wip/wfs-capabilities-loader.ts"],"sourcesContent":["// loaders.gl, MIT license\n\nimport type {LoaderWithParser, LoaderOptions} from '@loaders.gl/loader-utils';\nimport type {WFSCapabilities} from './lib/wfs/parse-wfs-capabilities';\nimport {parseWFSCapabilities} from './lib/wfs/parse-wfs-capabilities';\n\n// __VERSION__ is injected by babel-plugin-version-inline\n// @ts-ignore TS2304: Cannot find name '__VERSION__'.\nconst VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';\n\nexport type {WFSCapabilities};\n\nexport type WFSLoaderOptions = LoaderOptions & {\n wfs?: {};\n};\n\n/**\n * Loader for the response to the WFS GetCapability request\n */\nexport const WFSCapabilitiesLoader = {\n id: 'wfs-capabilities',\n name: 'WFS Capabilities',\n\n module: 'wms',\n version: VERSION,\n worker: false,\n extensions: ['xml'],\n mimeTypes: ['application/vnd.ogc.wfs_xml', 'application/xml', 'text/xml'],\n testText: testXMLFile,\n options: {\n wms: {}\n },\n parse: async (arrayBuffer: ArrayBuffer, options?: WFSLoaderOptions) =>\n parseWFSCapabilities(new TextDecoder().decode(arrayBuffer), options),\n parseTextSync: (text: string, options?: WFSLoaderOptions) => parseWFSCapabilities(text, options)\n};\n\nfunction testXMLFile(text: string): boolean {\n // TODO - There could be space first.\n return text.startsWith('<?xml');\n}\n\nexport const _typecheckWFSCapabilitiesLoader: LoaderWithParser = WFSCapabilitiesLoader;\n"],"mappings":"AAIA,SAAQA,oBAAoB,QAAO,kCAAkC;AAIrE,MAAMC,OAAO,GAAG,
|
|
1
|
+
{"version":3,"file":"wfs-capabilities-loader.js","names":["parseWFSCapabilities","VERSION","WFSCapabilitiesLoader","id","name","module","version","worker","extensions","mimeTypes","testText","testXMLFile","options","wms","parse","arrayBuffer","TextDecoder","decode","parseTextSync","text","startsWith","_typecheckWFSCapabilitiesLoader"],"sources":["../../../src/wip/wfs-capabilities-loader.ts"],"sourcesContent":["// loaders.gl, MIT license\n\nimport type {LoaderWithParser, LoaderOptions} from '@loaders.gl/loader-utils';\nimport type {WFSCapabilities} from './lib/wfs/parse-wfs-capabilities';\nimport {parseWFSCapabilities} from './lib/wfs/parse-wfs-capabilities';\n\n// __VERSION__ is injected by babel-plugin-version-inline\n// @ts-ignore TS2304: Cannot find name '__VERSION__'.\nconst VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';\n\nexport type {WFSCapabilities};\n\nexport type WFSLoaderOptions = LoaderOptions & {\n wfs?: {};\n};\n\n/**\n * Loader for the response to the WFS GetCapability request\n */\nexport const WFSCapabilitiesLoader = {\n id: 'wfs-capabilities',\n name: 'WFS Capabilities',\n\n module: 'wms',\n version: VERSION,\n worker: false,\n extensions: ['xml'],\n mimeTypes: ['application/vnd.ogc.wfs_xml', 'application/xml', 'text/xml'],\n testText: testXMLFile,\n options: {\n wms: {}\n },\n parse: async (arrayBuffer: ArrayBuffer, options?: WFSLoaderOptions) =>\n parseWFSCapabilities(new TextDecoder().decode(arrayBuffer), options),\n parseTextSync: (text: string, options?: WFSLoaderOptions) => parseWFSCapabilities(text, options)\n};\n\nfunction testXMLFile(text: string): boolean {\n // TODO - There could be space first.\n return text.startsWith('<?xml');\n}\n\nexport const _typecheckWFSCapabilitiesLoader: LoaderWithParser = WFSCapabilitiesLoader;\n"],"mappings":"AAIA,SAAQA,oBAAoB,QAAO,kCAAkC;AAIrE,MAAMC,OAAO,GAAG,cAAkB,KAAK,WAAW,aAAiB,QAAQ;AAW3E,OAAO,MAAMC,qBAAqB,GAAG;EACnCC,EAAE,EAAE,kBAAkB;EACtBC,IAAI,EAAE,kBAAkB;EAExBC,MAAM,EAAE,KAAK;EACbC,OAAO,EAAEL,OAAO;EAChBM,MAAM,EAAE,KAAK;EACbC,UAAU,EAAE,CAAC,KAAK,CAAC;EACnBC,SAAS,EAAE,CAAC,6BAA6B,EAAE,iBAAiB,EAAE,UAAU,CAAC;EACzEC,QAAQ,EAAEC,WAAW;EACrBC,OAAO,EAAE;IACPC,GAAG,EAAE,CAAC;EACR,CAAC;EACDC,KAAK,EAAE,MAAAA,CAAOC,WAAwB,EAAEH,OAA0B,KAChEZ,oBAAoB,CAAC,IAAIgB,WAAW,CAAC,CAAC,CAACC,MAAM,CAACF,WAAW,CAAC,EAAEH,OAAO,CAAC;EACtEM,aAAa,EAAEA,CAACC,IAAY,EAAEP,OAA0B,KAAKZ,oBAAoB,CAACmB,IAAI,EAAEP,OAAO;AACjG,CAAC;AAED,SAASD,WAAWA,CAACQ,IAAY,EAAW;EAE1C,OAAOA,IAAI,CAACC,UAAU,CAAC,OAAO,CAAC;AACjC;AAEA,OAAO,MAAMC,+BAAiD,GAAGnB,qBAAqB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { parseWMTSCapabilities } from './lib/wmts/parse-wmts-capabilities';
|
|
2
|
-
const VERSION = typeof "3.4.
|
|
2
|
+
const VERSION = typeof "3.4.1" !== 'undefined' ? "3.4.1" : 'latest';
|
|
3
3
|
export const WMTSCapabilitiesLoader = {
|
|
4
4
|
id: 'wmts-capabilities',
|
|
5
5
|
name: 'WMTS Capabilities',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wmts-capabilities-loader.js","names":["parseWMTSCapabilities","VERSION","WMTSCapabilitiesLoader","id","name","module","version","worker","extensions","mimeTypes","testText","testXMLFile","options","wms","parse","arrayBuffer","TextDecoder","decode","parseTextSync","text","startsWith","_typecheckWMTSCapabilitiesLoader"],"sources":["../../../src/wip/wmts-capabilities-loader.ts"],"sourcesContent":["// loaders.gl, MIT license\n\nimport type {LoaderWithParser, LoaderOptions} from '@loaders.gl/loader-utils';\n// import type {WMTSCapabilities} from './lib/wmts/parse-wmts-capabilities';\nimport {parseWMTSCapabilities} from './lib/wmts/parse-wmts-capabilities';\n\n// __VERSION__ is injected by babel-plugin-version-inline\n// @ts-ignore TS2304: Cannot find name '__VERSION__'.\nconst VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';\n\n// export type {WMTSCapabilities};\n\nexport type WMTSLoaderOptions = LoaderOptions & {\n wmts?: {};\n};\n\n/**\n * Loader for the response to the WMTS GetCapability request\n */\nexport const WMTSCapabilitiesLoader = {\n id: 'wmts-capabilities',\n name: 'WMTS Capabilities',\n\n module: 'wms',\n version: VERSION,\n worker: false,\n extensions: ['xml'],\n mimeTypes: ['application/vnd.ogc.wmts_xml', 'application/xml', 'text/xml'],\n testText: testXMLFile,\n options: {\n wms: {}\n },\n parse: async (arrayBuffer: ArrayBuffer, options?: WMTSLoaderOptions) =>\n parseWMTSCapabilities(new TextDecoder().decode(arrayBuffer), options),\n parseTextSync: (text: string, options?: WMTSLoaderOptions) => parseWMTSCapabilities(text, options)\n};\n\nfunction testXMLFile(text: string): boolean {\n // TODO - There could be space first.\n return text.startsWith('<?xml');\n}\n\nexport const _typecheckWMTSCapabilitiesLoader: LoaderWithParser = WMTSCapabilitiesLoader;\n"],"mappings":"AAIA,SAAQA,qBAAqB,QAAO,oCAAoC;AAIxE,MAAMC,OAAO,GAAG,
|
|
1
|
+
{"version":3,"file":"wmts-capabilities-loader.js","names":["parseWMTSCapabilities","VERSION","WMTSCapabilitiesLoader","id","name","module","version","worker","extensions","mimeTypes","testText","testXMLFile","options","wms","parse","arrayBuffer","TextDecoder","decode","parseTextSync","text","startsWith","_typecheckWMTSCapabilitiesLoader"],"sources":["../../../src/wip/wmts-capabilities-loader.ts"],"sourcesContent":["// loaders.gl, MIT license\n\nimport type {LoaderWithParser, LoaderOptions} from '@loaders.gl/loader-utils';\n// import type {WMTSCapabilities} from './lib/wmts/parse-wmts-capabilities';\nimport {parseWMTSCapabilities} from './lib/wmts/parse-wmts-capabilities';\n\n// __VERSION__ is injected by babel-plugin-version-inline\n// @ts-ignore TS2304: Cannot find name '__VERSION__'.\nconst VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';\n\n// export type {WMTSCapabilities};\n\nexport type WMTSLoaderOptions = LoaderOptions & {\n wmts?: {};\n};\n\n/**\n * Loader for the response to the WMTS GetCapability request\n */\nexport const WMTSCapabilitiesLoader = {\n id: 'wmts-capabilities',\n name: 'WMTS Capabilities',\n\n module: 'wms',\n version: VERSION,\n worker: false,\n extensions: ['xml'],\n mimeTypes: ['application/vnd.ogc.wmts_xml', 'application/xml', 'text/xml'],\n testText: testXMLFile,\n options: {\n wms: {}\n },\n parse: async (arrayBuffer: ArrayBuffer, options?: WMTSLoaderOptions) =>\n parseWMTSCapabilities(new TextDecoder().decode(arrayBuffer), options),\n parseTextSync: (text: string, options?: WMTSLoaderOptions) => parseWMTSCapabilities(text, options)\n};\n\nfunction testXMLFile(text: string): boolean {\n // TODO - There could be space first.\n return text.startsWith('<?xml');\n}\n\nexport const _typecheckWMTSCapabilitiesLoader: LoaderWithParser = WMTSCapabilitiesLoader;\n"],"mappings":"AAIA,SAAQA,qBAAqB,QAAO,oCAAoC;AAIxE,MAAMC,OAAO,GAAG,cAAkB,KAAK,WAAW,aAAiB,QAAQ;AAW3E,OAAO,MAAMC,sBAAsB,GAAG;EACpCC,EAAE,EAAE,mBAAmB;EACvBC,IAAI,EAAE,mBAAmB;EAEzBC,MAAM,EAAE,KAAK;EACbC,OAAO,EAAEL,OAAO;EAChBM,MAAM,EAAE,KAAK;EACbC,UAAU,EAAE,CAAC,KAAK,CAAC;EACnBC,SAAS,EAAE,CAAC,8BAA8B,EAAE,iBAAiB,EAAE,UAAU,CAAC;EAC1EC,QAAQ,EAAEC,WAAW;EACrBC,OAAO,EAAE;IACPC,GAAG,EAAE,CAAC;EACR,CAAC;EACDC,KAAK,EAAE,MAAAA,CAAOC,WAAwB,EAAEH,OAA2B,KACjEZ,qBAAqB,CAAC,IAAIgB,WAAW,CAAC,CAAC,CAACC,MAAM,CAACF,WAAW,CAAC,EAAEH,OAAO,CAAC;EACvEM,aAAa,EAAEA,CAACC,IAAY,EAAEP,OAA2B,KAAKZ,qBAAqB,CAACmB,IAAI,EAAEP,OAAO;AACnG,CAAC;AAED,SAASD,WAAWA,CAACQ,IAAY,EAAW;EAE1C,OAAOA,IAAI,CAACC,UAAU,CAAC,OAAO,CAAC;AACjC;AAEA,OAAO,MAAMC,gCAAkD,GAAGnB,sBAAsB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { parseWMSCapabilities } from './lib/parsers/wms/parse-wms-capabilities';
|
|
2
|
-
const VERSION = typeof "3.4.
|
|
2
|
+
const VERSION = typeof "3.4.1" !== 'undefined' ? "3.4.1" : 'latest';
|
|
3
3
|
export const WMSCapabilitiesLoader = {
|
|
4
4
|
id: 'wms-capabilities',
|
|
5
5
|
name: 'WMS Capabilities',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wms-capabilities-loader.js","names":["parseWMSCapabilities","VERSION","WMSCapabilitiesLoader","id","name","module","version","worker","extensions","mimeTypes","testText","testXMLFile","options","wms","parse","arrayBuffer","TextDecoder","decode","parseTextSync","text","startsWith","_typecheckWMSCapabilitiesLoader"],"sources":["../../src/wms-capabilities-loader.ts"],"sourcesContent":["// loaders.gl, MIT license\n\nimport type {LoaderWithParser, LoaderOptions} from '@loaders.gl/loader-utils';\nimport type {WMSCapabilities} from './lib/parsers/wms/parse-wms-capabilities';\nimport {parseWMSCapabilities} from './lib/parsers/wms/parse-wms-capabilities';\n\n// __VERSION__ is injected by babel-plugin-version-inline\n// @ts-ignore TS2304: Cannot find name '__VERSION__'.\nconst VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';\n\n// Parsed data type\nexport type {WMSCapabilities};\n\nexport type WMSLoaderOptions = LoaderOptions & {\n wms?: {\n /** Add inherited layer information to sub layers */\n inheritedLayerProps?: boolean;\n /** Whether to include \"raw\" XML-derived JSON */\n raw?: boolean;\n };\n};\n\n/**\n * Loader for the response to the WMS GetCapability request\n */\nexport const WMSCapabilitiesLoader = {\n id: 'wms-capabilities',\n name: 'WMS Capabilities',\n\n module: 'wms',\n version: VERSION,\n worker: false,\n extensions: ['xml'],\n mimeTypes: ['application/vnd.ogc.wms_xml', 'application/xml', 'text/xml'],\n testText: testXMLFile,\n options: {\n wms: {}\n },\n parse: async (arrayBuffer: ArrayBuffer, options?: WMSLoaderOptions) =>\n parseWMSCapabilities(new TextDecoder().decode(arrayBuffer), options?.wms),\n parseTextSync: (text: string, options?: WMSLoaderOptions) =>\n parseWMSCapabilities(text, options?.wms)\n};\n\nfunction testXMLFile(text: string): boolean {\n // TODO - There could be space first.\n return text.startsWith('<?xml');\n}\n\nexport const _typecheckWMSCapabilitiesLoader: LoaderWithParser = WMSCapabilitiesLoader;\n"],"mappings":"AAIA,SAAQA,oBAAoB,QAAO,0CAA0C;AAI7E,MAAMC,OAAO,GAAG,
|
|
1
|
+
{"version":3,"file":"wms-capabilities-loader.js","names":["parseWMSCapabilities","VERSION","WMSCapabilitiesLoader","id","name","module","version","worker","extensions","mimeTypes","testText","testXMLFile","options","wms","parse","arrayBuffer","TextDecoder","decode","parseTextSync","text","startsWith","_typecheckWMSCapabilitiesLoader"],"sources":["../../src/wms-capabilities-loader.ts"],"sourcesContent":["// loaders.gl, MIT license\n\nimport type {LoaderWithParser, LoaderOptions} from '@loaders.gl/loader-utils';\nimport type {WMSCapabilities} from './lib/parsers/wms/parse-wms-capabilities';\nimport {parseWMSCapabilities} from './lib/parsers/wms/parse-wms-capabilities';\n\n// __VERSION__ is injected by babel-plugin-version-inline\n// @ts-ignore TS2304: Cannot find name '__VERSION__'.\nconst VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';\n\n// Parsed data type\nexport type {WMSCapabilities};\n\nexport type WMSLoaderOptions = LoaderOptions & {\n wms?: {\n /** Add inherited layer information to sub layers */\n inheritedLayerProps?: boolean;\n /** Whether to include \"raw\" XML-derived JSON */\n raw?: boolean;\n };\n};\n\n/**\n * Loader for the response to the WMS GetCapability request\n */\nexport const WMSCapabilitiesLoader = {\n id: 'wms-capabilities',\n name: 'WMS Capabilities',\n\n module: 'wms',\n version: VERSION,\n worker: false,\n extensions: ['xml'],\n mimeTypes: ['application/vnd.ogc.wms_xml', 'application/xml', 'text/xml'],\n testText: testXMLFile,\n options: {\n wms: {}\n },\n parse: async (arrayBuffer: ArrayBuffer, options?: WMSLoaderOptions) =>\n parseWMSCapabilities(new TextDecoder().decode(arrayBuffer), options?.wms),\n parseTextSync: (text: string, options?: WMSLoaderOptions) =>\n parseWMSCapabilities(text, options?.wms)\n};\n\nfunction testXMLFile(text: string): boolean {\n // TODO - There could be space first.\n return text.startsWith('<?xml');\n}\n\nexport const _typecheckWMSCapabilitiesLoader: LoaderWithParser = WMSCapabilitiesLoader;\n"],"mappings":"AAIA,SAAQA,oBAAoB,QAAO,0CAA0C;AAI7E,MAAMC,OAAO,GAAG,cAAkB,KAAK,WAAW,aAAiB,QAAQ;AAiB3E,OAAO,MAAMC,qBAAqB,GAAG;EACnCC,EAAE,EAAE,kBAAkB;EACtBC,IAAI,EAAE,kBAAkB;EAExBC,MAAM,EAAE,KAAK;EACbC,OAAO,EAAEL,OAAO;EAChBM,MAAM,EAAE,KAAK;EACbC,UAAU,EAAE,CAAC,KAAK,CAAC;EACnBC,SAAS,EAAE,CAAC,6BAA6B,EAAE,iBAAiB,EAAE,UAAU,CAAC;EACzEC,QAAQ,EAAEC,WAAW;EACrBC,OAAO,EAAE;IACPC,GAAG,EAAE,CAAC;EACR,CAAC;EACDC,KAAK,EAAE,MAAAA,CAAOC,WAAwB,EAAEH,OAA0B,KAChEZ,oBAAoB,CAAC,IAAIgB,WAAW,CAAC,CAAC,CAACC,MAAM,CAACF,WAAW,CAAC,EAAEH,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEC,GAAG,CAAC;EAC3EK,aAAa,EAAEA,CAACC,IAAY,EAAEP,OAA0B,KACtDZ,oBAAoB,CAACmB,IAAI,EAAEP,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEC,GAAG;AAC3C,CAAC;AAED,SAASF,WAAWA,CAACQ,IAAY,EAAW;EAE1C,OAAOA,IAAI,CAACC,UAAU,CAAC,OAAO,CAAC;AACjC;AAEA,OAAO,MAAMC,+BAAiD,GAAGnB,qBAAqB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { parseWMSError } from './lib/parsers/wms/parse-wms-error';
|
|
2
|
-
const VERSION = typeof "3.4.
|
|
2
|
+
const VERSION = typeof "3.4.1" !== 'undefined' ? "3.4.1" : 'latest';
|
|
3
3
|
export const WMSErrorLoader = {
|
|
4
4
|
id: 'wms-error',
|
|
5
5
|
name: 'WMS Error',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wms-error-loader.js","names":["parseWMSError","VERSION","WMSErrorLoader","id","name","module","version","worker","extensions","mimeTypes","testText","testXMLFile","options","wms","throwOnError","parse","arrayBuffer","parseTextSync","TextDecoder","decode","parseSync","text","startsWith","wmsOptions","error","message","minimalErrors","concat","Error","_typecheckWMSErrorLoader"],"sources":["../../src/wms-error-loader.ts"],"sourcesContent":["// loaders.gl, MIT license\n\nimport type {LoaderWithParser, LoaderOptions} from '@loaders.gl/loader-utils';\nimport {parseWMSError} from './lib/parsers/wms/parse-wms-error';\n\n// __VERSION__ is injected by babel-plugin-version-inline\n// @ts-ignore TS2304: Cannot find name '__VERSION__'.\nconst VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';\n\nexport type WMSLoaderOptions = LoaderOptions & {\n wms?: {\n /** By default the error loader will throw an error with the parsed error message */\n throwOnError?: boolean;\n /** Do not add any text to errors */\n minimalErrors?: boolean;\n };\n};\n\n/**\n * Loader for the response to the WMS GetCapability request\n */\nexport const WMSErrorLoader = {\n id: 'wms-error',\n name: 'WMS Error',\n\n module: 'wms',\n version: VERSION,\n worker: false,\n extensions: ['xml'],\n mimeTypes: ['application/vnd.ogc.se_xml', 'application/xml', 'text/xml'],\n testText: testXMLFile,\n options: {\n wms: {\n throwOnError: false\n }\n },\n parse: async (arrayBuffer: ArrayBuffer, options?: WMSLoaderOptions): Promise<string> =>\n parseTextSync(new TextDecoder().decode(arrayBuffer), options),\n parseSync: (arrayBuffer: ArrayBuffer, options?: WMSLoaderOptions): string =>\n parseTextSync(new TextDecoder().decode(arrayBuffer), options),\n parseTextSync: (text: string, options?: WMSLoaderOptions): string => parseTextSync(text, options)\n};\n\nfunction testXMLFile(text: string): boolean {\n // TODO - There could be space first.\n return text.startsWith('<?xml');\n}\n\nfunction parseTextSync(text: string, options?: WMSLoaderOptions): string {\n const wmsOptions: WMSLoaderOptions['wms'] = {...WMSErrorLoader.options.wms, ...options?.wms};\n const error = parseWMSError(text, wmsOptions);\n const message = wmsOptions.minimalErrors ? error : `WMS Service error: ${error}`;\n if (wmsOptions.throwOnError) {\n throw new Error(message);\n }\n return message;\n}\n\nexport const _typecheckWMSErrorLoader: LoaderWithParser = WMSErrorLoader;\n"],"mappings":"AAGA,SAAQA,aAAa,QAAO,mCAAmC;AAI/D,MAAMC,OAAO,GAAG,
|
|
1
|
+
{"version":3,"file":"wms-error-loader.js","names":["parseWMSError","VERSION","WMSErrorLoader","id","name","module","version","worker","extensions","mimeTypes","testText","testXMLFile","options","wms","throwOnError","parse","arrayBuffer","parseTextSync","TextDecoder","decode","parseSync","text","startsWith","wmsOptions","error","message","minimalErrors","concat","Error","_typecheckWMSErrorLoader"],"sources":["../../src/wms-error-loader.ts"],"sourcesContent":["// loaders.gl, MIT license\n\nimport type {LoaderWithParser, LoaderOptions} from '@loaders.gl/loader-utils';\nimport {parseWMSError} from './lib/parsers/wms/parse-wms-error';\n\n// __VERSION__ is injected by babel-plugin-version-inline\n// @ts-ignore TS2304: Cannot find name '__VERSION__'.\nconst VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';\n\nexport type WMSLoaderOptions = LoaderOptions & {\n wms?: {\n /** By default the error loader will throw an error with the parsed error message */\n throwOnError?: boolean;\n /** Do not add any text to errors */\n minimalErrors?: boolean;\n };\n};\n\n/**\n * Loader for the response to the WMS GetCapability request\n */\nexport const WMSErrorLoader = {\n id: 'wms-error',\n name: 'WMS Error',\n\n module: 'wms',\n version: VERSION,\n worker: false,\n extensions: ['xml'],\n mimeTypes: ['application/vnd.ogc.se_xml', 'application/xml', 'text/xml'],\n testText: testXMLFile,\n options: {\n wms: {\n throwOnError: false\n }\n },\n parse: async (arrayBuffer: ArrayBuffer, options?: WMSLoaderOptions): Promise<string> =>\n parseTextSync(new TextDecoder().decode(arrayBuffer), options),\n parseSync: (arrayBuffer: ArrayBuffer, options?: WMSLoaderOptions): string =>\n parseTextSync(new TextDecoder().decode(arrayBuffer), options),\n parseTextSync: (text: string, options?: WMSLoaderOptions): string => parseTextSync(text, options)\n};\n\nfunction testXMLFile(text: string): boolean {\n // TODO - There could be space first.\n return text.startsWith('<?xml');\n}\n\nfunction parseTextSync(text: string, options?: WMSLoaderOptions): string {\n const wmsOptions: WMSLoaderOptions['wms'] = {...WMSErrorLoader.options.wms, ...options?.wms};\n const error = parseWMSError(text, wmsOptions);\n const message = wmsOptions.minimalErrors ? error : `WMS Service error: ${error}`;\n if (wmsOptions.throwOnError) {\n throw new Error(message);\n }\n return message;\n}\n\nexport const _typecheckWMSErrorLoader: LoaderWithParser = WMSErrorLoader;\n"],"mappings":"AAGA,SAAQA,aAAa,QAAO,mCAAmC;AAI/D,MAAMC,OAAO,GAAG,cAAkB,KAAK,WAAW,aAAiB,QAAQ;AAc3E,OAAO,MAAMC,cAAc,GAAG;EAC5BC,EAAE,EAAE,WAAW;EACfC,IAAI,EAAE,WAAW;EAEjBC,MAAM,EAAE,KAAK;EACbC,OAAO,EAAEL,OAAO;EAChBM,MAAM,EAAE,KAAK;EACbC,UAAU,EAAE,CAAC,KAAK,CAAC;EACnBC,SAAS,EAAE,CAAC,4BAA4B,EAAE,iBAAiB,EAAE,UAAU,CAAC;EACxEC,QAAQ,EAAEC,WAAW;EACrBC,OAAO,EAAE;IACPC,GAAG,EAAE;MACHC,YAAY,EAAE;IAChB;EACF,CAAC;EACDC,KAAK,EAAE,MAAAA,CAAOC,WAAwB,EAAEJ,OAA0B,KAChEK,aAAa,CAAC,IAAIC,WAAW,CAAC,CAAC,CAACC,MAAM,CAACH,WAAW,CAAC,EAAEJ,OAAO,CAAC;EAC/DQ,SAAS,EAAEA,CAACJ,WAAwB,EAAEJ,OAA0B,KAC9DK,aAAa,CAAC,IAAIC,WAAW,CAAC,CAAC,CAACC,MAAM,CAACH,WAAW,CAAC,EAAEJ,OAAO,CAAC;EAC/DK,aAAa,EAAEA,CAACI,IAAY,EAAET,OAA0B,KAAaK,aAAa,CAACI,IAAI,EAAET,OAAO;AAClG,CAAC;AAED,SAASD,WAAWA,CAACU,IAAY,EAAW;EAE1C,OAAOA,IAAI,CAACC,UAAU,CAAC,OAAO,CAAC;AACjC;AAEA,SAASL,aAAaA,CAACI,IAAY,EAAET,OAA0B,EAAU;EACvE,MAAMW,UAAmC,GAAG;IAAC,GAAGrB,cAAc,CAACU,OAAO,CAACC,GAAG;IAAE,IAAGD,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEC,GAAG;EAAA,CAAC;EAC5F,MAAMW,KAAK,GAAGxB,aAAa,CAACqB,IAAI,EAAEE,UAAU,CAAC;EAC7C,MAAME,OAAO,GAAGF,UAAU,CAACG,aAAa,GAAGF,KAAK,yBAAAG,MAAA,CAAyBH,KAAK,CAAE;EAChF,IAAID,UAAU,CAACT,YAAY,EAAE;IAC3B,MAAM,IAAIc,KAAK,CAACH,OAAO,CAAC;EAC1B;EACA,OAAOA,OAAO;AAChB;AAEA,OAAO,MAAMI,wBAA0C,GAAG3B,cAAc"}
|
|
@@ -7,7 +7,7 @@ type CSWCommonParameters = {
|
|
|
7
7
|
/** In case the endpoint supports multiple services */
|
|
8
8
|
service?: 'CSW';
|
|
9
9
|
/** In case the endpoint supports multiple CSW versions */
|
|
10
|
-
version?: '1.1.1' | '2.0.0' | '2.0.1' | '3.0.0'
|
|
10
|
+
version?: '1.1.1' | '2.0.0' | '2.0.1' | '3.0.0';
|
|
11
11
|
};
|
|
12
12
|
export type CSWGetCapabilitiesParameters = CSWCommonParameters & {
|
|
13
13
|
/** Request type */
|
|
@@ -23,8 +23,11 @@ export type CSWGetDomainParameters = CSWCommonParameters & {
|
|
|
23
23
|
/** Request type */
|
|
24
24
|
request?: 'GetDomain';
|
|
25
25
|
};
|
|
26
|
+
/** Describes a service or resource exposed by the catalog */
|
|
26
27
|
export type Service = {
|
|
28
|
+
/** name of service or resource */
|
|
27
29
|
name: string;
|
|
30
|
+
/** type of service or resource */
|
|
28
31
|
type: string;
|
|
29
32
|
url: string;
|
|
30
33
|
params?: string;
|
|
@@ -34,10 +37,9 @@ export type CSWServiceProps = DataSourceProps & {
|
|
|
34
37
|
url: string;
|
|
35
38
|
};
|
|
36
39
|
/**
|
|
37
|
-
* The CSWService class
|
|
40
|
+
* The CSWService class
|
|
38
41
|
* - provides type safe methods to form URLs to a CSW service
|
|
39
42
|
* - provides type safe methods to query and parse results (and errors) from a CSW service
|
|
40
|
-
* - implements the ImageService interface
|
|
41
43
|
* @note Only the URL parameter conversion is supported. XML posts are not supported.
|
|
42
44
|
*/
|
|
43
45
|
export declare class CSWService extends DataSource<CSWServiceProps> {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"csw-service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/ogc/csw-service.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAC,UAAU,EAAC,MAAM,2BAA2B,CAAC;AAErD,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,kCAAkC,CAAC;AAGtE,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,6BAA6B,CAAC;AAG5D,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,4BAA4B,CAAC;AAK1D,KAAK,mBAAmB,GAAG;IACzB,sDAAsD;IACtD,OAAO,CAAC,EAAE,KAAK,CAAC;IAChB,0DAA0D;IAC1D,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,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AC5C,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACzC,MAAM;IAWT,qDAAqD;IACrD,aAAa,CACX,aAAa,CAAC,EAAE,uBAAuB,EACvC,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACzC,MAAM;IAYT,qDAAqD;IACrD,YAAY,CACV,aAAa,CAAC,EAAE,sBAAsB,EACtC,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACzC,MAAM;IAaT;;SAEK;IACL,SAAS,CAAC,UAAU,CAClB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAChC,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACzC,MAAM;IAeT,qFAAqF;IACrF,SAAS,CAAC,cAAc,CAAC,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,GAAG,IAAI;IAQ5E,+BAA+B;IAC/B,SAAS,CAAC,WAAW,CAAC,WAAW,EAAE,WAAW,GAAG,KAAK;CAIvD"}
|
|
@@ -8,10 +8,9 @@ const csw_records_loader_1 = require("../../../csw-records-loader");
|
|
|
8
8
|
const csw_domain_loader_1 = require("../../../csw-domain-loader");
|
|
9
9
|
const wms_error_loader_1 = require("../../../wms-error-loader");
|
|
10
10
|
/**
|
|
11
|
-
* The CSWService class
|
|
11
|
+
* The CSWService class
|
|
12
12
|
* - provides type safe methods to form URLs to a CSW service
|
|
13
13
|
* - provides type safe methods to query and parse results (and errors) from a CSW service
|
|
14
|
-
* - implements the ImageService interface
|
|
15
14
|
* @note Only the URL parameter conversion is supported. XML posts are not supported.
|
|
16
15
|
*/
|
|
17
16
|
class CSWService extends data_source_1.DataSource {
|
|
@@ -27,6 +27,10 @@ export type WMSParameters = {
|
|
|
27
27
|
styles?: unknown;
|
|
28
28
|
/** Any additional parameters specific to this WMSService (GetMap) */
|
|
29
29
|
transparent?: boolean;
|
|
30
|
+
/** If layer supports time dimension */
|
|
31
|
+
time?: string;
|
|
32
|
+
/** If layer supports elevation dimension */
|
|
33
|
+
elevation?: string;
|
|
30
34
|
};
|
|
31
35
|
/** Parameters for GetCapabilities */
|
|
32
36
|
export type WMSGetCapabilitiesParameters = {
|
|
@@ -43,6 +47,8 @@ export type WMSGetMapParameters = {
|
|
|
43
47
|
width: number;
|
|
44
48
|
/** pixels */
|
|
45
49
|
height: number;
|
|
50
|
+
/** requested format for the return image. can be provided in service constructor */
|
|
51
|
+
format?: 'image/png';
|
|
46
52
|
/** Layers to render - can be provided in service constructor */
|
|
47
53
|
layers?: string | string[];
|
|
48
54
|
/** Coordinate Reference System for the image (not bounding box). can be provided in service constructor. */
|
|
@@ -51,8 +57,10 @@ export type WMSGetMapParameters = {
|
|
|
51
57
|
styles?: unknown;
|
|
52
58
|
/** Don't render background when no data. can be provided in service constructor */
|
|
53
59
|
transparent?: boolean;
|
|
54
|
-
/**
|
|
55
|
-
|
|
60
|
+
/** If layer supports time dimension */
|
|
61
|
+
time?: string;
|
|
62
|
+
/** If layer supports elevation dimension */
|
|
63
|
+
elevation?: string;
|
|
56
64
|
};
|
|
57
65
|
/** GetMap parameters that are specific to the current view */
|
|
58
66
|
export type WMSGetMapViewParameters = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wms-service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/ogc/wms-service.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,oBAAoB,CAAC;AAIlD,OAAO,KAAK,EAAC,mBAAmB,EAAE,kBAAkB,EAAC,MAAM,4BAA4B,CAAC;AACxF,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAC,WAAW,EAAC,MAAM,4BAA4B,CAAC;AAEvD,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,kCAAkC,CAAC;AACtE,OAAO,KAAK,EAAC,cA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AAG,CAAC,EAAE,MAAM,CAAA;KAAC,EACnE,aAAa,EAAE,WAAW,GACzB,WAAW;IAUd,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,aAAa,GAAG,MAAM;IAwCnF,+DAA+D;IAC/D,gBAAgB,CACd,SAAS,EAAE,OAAO,EAClB,aAAa,EAAE,aAAa,GAC3B,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI;IAkB1C,8EAA8E;cAC9D,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAOpE,qFAAqF;IACrF,SAAS,CAAC,cAAc,CAAC,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,GAAG,IAAI;IAY5E,+BAA+B;IAC/B,SAAS,CAAC,WAAW,CAAC,WAAW,EAAE,WAAW,GAAG,KAAK;CAIvD"}
|
|
@@ -44,6 +44,8 @@ class WMSService extends image_source_1.ImageSource {
|
|
|
44
44
|
format: 'image/png',
|
|
45
45
|
info_format: 'text/plain',
|
|
46
46
|
transparent: undefined,
|
|
47
|
+
time: undefined,
|
|
48
|
+
elevation: undefined,
|
|
47
49
|
...props.wmsParameters
|
|
48
50
|
};
|
|
49
51
|
this.vendorParameters = props.vendorParameters || {};
|
|
@@ -137,6 +139,8 @@ class WMSService extends image_source_1.ImageSource {
|
|
|
137
139
|
version: this.wmsParameters.version,
|
|
138
140
|
format: this.wmsParameters.format,
|
|
139
141
|
transparent: this.wmsParameters.transparent,
|
|
142
|
+
time: this.wmsParameters.time,
|
|
143
|
+
elevation: this.wmsParameters.elevation,
|
|
140
144
|
layers: this.wmsParameters.layers,
|
|
141
145
|
styles: this.wmsParameters.styles,
|
|
142
146
|
crs: this.wmsParameters.crs,
|
|
@@ -212,9 +216,10 @@ class WMSService extends image_source_1.ImageSource {
|
|
|
212
216
|
...vendorParameters
|
|
213
217
|
};
|
|
214
218
|
// Encode the keys
|
|
219
|
+
const IGNORE_EMPTY_KEYS = ['transparent', 'time', 'elevation'];
|
|
215
220
|
for (const [key, value] of Object.entries(allParameters)) {
|
|
216
221
|
// hack to preserve test cases. Not super clear if keys should be included when values are undefined
|
|
217
|
-
if (key
|
|
222
|
+
if (!IGNORE_EMPTY_KEYS.includes(key) || value) {
|
|
218
223
|
url += first ? '?' : '&';
|
|
219
224
|
first = false;
|
|
220
225
|
url += this._getURLParameter(key, value, wmsParameters);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loaders.gl/wms",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.1",
|
|
4
4
|
"description": "Framework-independent loaders for the WMS (Web Map Service) standard",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@babel/runtime": "^7.3.1",
|
|
42
|
-
"@loaders.gl/images": "3.4.
|
|
43
|
-
"@loaders.gl/loader-utils": "3.4.
|
|
44
|
-
"@loaders.gl/schema": "3.4.
|
|
45
|
-
"@loaders.gl/xml": "3.4.
|
|
42
|
+
"@loaders.gl/images": "3.4.1",
|
|
43
|
+
"@loaders.gl/loader-utils": "3.4.1",
|
|
44
|
+
"@loaders.gl/schema": "3.4.1",
|
|
45
|
+
"@loaders.gl/xml": "3.4.1",
|
|
46
46
|
"@turf/rewind": "^5.1.5",
|
|
47
47
|
"deep-strict-equal": "^0.2.0",
|
|
48
48
|
"lerc": "^4.0.1"
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"xmldom": "0.6.0"
|
|
52
52
|
},
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "2c39d1032c1a8b3678a6f09507b89ffe92ca9e1b"
|
|
54
54
|
}
|
|
@@ -20,7 +20,7 @@ type CSWCommonParameters = {
|
|
|
20
20
|
/** In case the endpoint supports multiple services */
|
|
21
21
|
service?: 'CSW';
|
|
22
22
|
/** In case the endpoint supports multiple CSW versions */
|
|
23
|
-
version?: '1.1.1' | '2.0.0' | '2.0.1' | '3.0.0'
|
|
23
|
+
version?: '1.1.1' | '2.0.0' | '2.0.1' | '3.0.0';
|
|
24
24
|
};
|
|
25
25
|
|
|
26
26
|
export type CSWGetCapabilitiesParameters = CSWCommonParameters & {
|
|
@@ -41,17 +41,25 @@ export type CSWGetDomainParameters = CSWCommonParameters & {
|
|
|
41
41
|
// TBA
|
|
42
42
|
};
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
/** Describes a service or resource exposed by the catalog */
|
|
45
|
+
export type Service = {
|
|
46
|
+
/** name of service or resource */
|
|
47
|
+
name: string;
|
|
48
|
+
/** type of service or resource */
|
|
49
|
+
type: string;
|
|
50
|
+
url: string;
|
|
51
|
+
params?: string;
|
|
52
|
+
scheme?: string;
|
|
53
|
+
};
|
|
45
54
|
|
|
46
55
|
export type CSWServiceProps = DataSourceProps & {
|
|
47
56
|
url: string;
|
|
48
57
|
};
|
|
49
58
|
|
|
50
59
|
/**
|
|
51
|
-
* The CSWService class
|
|
60
|
+
* The CSWService class
|
|
52
61
|
* - provides type safe methods to form URLs to a CSW service
|
|
53
62
|
* - provides type safe methods to query and parse results (and errors) from a CSW service
|
|
54
|
-
* - implements the ImageService interface
|
|
55
63
|
* @note Only the URL parameter conversion is supported. XML posts are not supported.
|
|
56
64
|
*/
|
|
57
65
|
export class CSWService extends DataSource<CSWServiceProps> {
|
|
@@ -42,6 +42,10 @@ export type WMSParameters = {
|
|
|
42
42
|
styles?: unknown;
|
|
43
43
|
/** Any additional parameters specific to this WMSService (GetMap) */
|
|
44
44
|
transparent?: boolean;
|
|
45
|
+
/** If layer supports time dimension */
|
|
46
|
+
time?: string;
|
|
47
|
+
/** If layer supports elevation dimension */
|
|
48
|
+
elevation?: string;
|
|
45
49
|
};
|
|
46
50
|
|
|
47
51
|
/** Parameters for GetCapabilities */
|
|
@@ -60,6 +64,8 @@ export type WMSGetMapParameters = {
|
|
|
60
64
|
width: number;
|
|
61
65
|
/** pixels */
|
|
62
66
|
height: number;
|
|
67
|
+
/** requested format for the return image. can be provided in service constructor */
|
|
68
|
+
format?: 'image/png';
|
|
63
69
|
/** Layers to render - can be provided in service constructor */
|
|
64
70
|
layers?: string | string[];
|
|
65
71
|
/** Coordinate Reference System for the image (not bounding box). can be provided in service constructor. */
|
|
@@ -68,8 +74,10 @@ export type WMSGetMapParameters = {
|
|
|
68
74
|
styles?: unknown;
|
|
69
75
|
/** Don't render background when no data. can be provided in service constructor */
|
|
70
76
|
transparent?: boolean;
|
|
71
|
-
/**
|
|
72
|
-
|
|
77
|
+
/** If layer supports time dimension */
|
|
78
|
+
time?: string;
|
|
79
|
+
/** If layer supports elevation dimension */
|
|
80
|
+
elevation?: string;
|
|
73
81
|
};
|
|
74
82
|
|
|
75
83
|
/** GetMap parameters that are specific to the current view */
|
|
@@ -213,6 +221,8 @@ export class WMSService extends ImageSource<WMSServiceProps> {
|
|
|
213
221
|
format: 'image/png',
|
|
214
222
|
info_format: 'text/plain',
|
|
215
223
|
transparent: undefined!,
|
|
224
|
+
time: undefined!,
|
|
225
|
+
elevation: undefined!,
|
|
216
226
|
...props.wmsParameters
|
|
217
227
|
};
|
|
218
228
|
|
|
@@ -342,6 +352,8 @@ export class WMSService extends ImageSource<WMSServiceProps> {
|
|
|
342
352
|
version: this.wmsParameters.version,
|
|
343
353
|
format: this.wmsParameters.format,
|
|
344
354
|
transparent: this.wmsParameters.transparent,
|
|
355
|
+
time: this.wmsParameters.time,
|
|
356
|
+
elevation: this.wmsParameters.elevation,
|
|
345
357
|
layers: this.wmsParameters.layers,
|
|
346
358
|
styles: this.wmsParameters.styles,
|
|
347
359
|
crs: this.wmsParameters.crs,
|
|
@@ -440,9 +452,10 @@ export class WMSService extends ImageSource<WMSServiceProps> {
|
|
|
440
452
|
};
|
|
441
453
|
|
|
442
454
|
// Encode the keys
|
|
455
|
+
const IGNORE_EMPTY_KEYS = ['transparent', 'time', 'elevation'];
|
|
443
456
|
for (const [key, value] of Object.entries(allParameters)) {
|
|
444
457
|
// hack to preserve test cases. Not super clear if keys should be included when values are undefined
|
|
445
|
-
if (key
|
|
458
|
+
if (!IGNORE_EMPTY_KEYS.includes(key) || value) {
|
|
446
459
|
url += first ? '?' : '&';
|
|
447
460
|
first = false;
|
|
448
461
|
url += this._getURLParameter(key, value, wmsParameters);
|