@loaders.gl/wms 4.0.0-alpha.9 → 4.0.0-beta.2

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.
Files changed (259) hide show
  1. package/dist/csw-capabilities-loader.d.ts +1 -17
  2. package/dist/csw-capabilities-loader.d.ts.map +1 -1
  3. package/dist/csw-domain-loader.d.ts +1 -17
  4. package/dist/csw-domain-loader.d.ts.map +1 -1
  5. package/dist/csw-records-loader.d.ts +1 -1
  6. package/dist/csw-records-loader.d.ts.map +1 -1
  7. package/dist/dist.min.js +187 -161
  8. package/dist/es5/csw-capabilities-loader.js +2 -4
  9. package/dist/es5/csw-capabilities-loader.js.map +1 -1
  10. package/dist/es5/csw-domain-loader.js +2 -4
  11. package/dist/es5/csw-domain-loader.js.map +1 -1
  12. package/dist/es5/csw-records-loader.js +2 -2
  13. package/dist/es5/csw-records-loader.js.map +1 -1
  14. package/dist/es5/gml-loader.js +2 -4
  15. package/dist/es5/gml-loader.js.map +1 -1
  16. package/dist/es5/index.js +23 -10
  17. package/dist/es5/index.js.map +1 -1
  18. package/dist/es5/lerc-loader.js +2 -4
  19. package/dist/es5/lerc-loader.js.map +1 -1
  20. package/dist/es5/lib/parsers/gml/parse-gml.js.map +1 -1
  21. package/dist/es5/lib/{create-image-source.js → services/create-image-service.js} +30 -21
  22. package/dist/es5/lib/services/create-image-service.js.map +1 -0
  23. package/dist/es5/lib/services/{generic/image-service.js → image-service.js} +2 -2
  24. package/dist/es5/lib/services/image-service.js.map +1 -0
  25. package/dist/es5/{lib/services → services}/arcgis/arcgis-image-service.js +22 -16
  26. package/dist/es5/services/arcgis/arcgis-image-service.js.map +1 -0
  27. package/dist/es5/services/arcgis/arcgis-server.js.map +1 -0
  28. package/dist/es5/services/create-image-source.js +14 -0
  29. package/dist/es5/services/create-image-source.js.map +1 -0
  30. package/dist/es5/{lib/services → services}/ogc/csw-service.js +10 -8
  31. package/dist/es5/services/ogc/csw-service.js.map +1 -0
  32. package/dist/es5/{lib/services → services}/ogc/wms-service.js +28 -22
  33. package/dist/es5/services/ogc/wms-service.js.map +1 -0
  34. package/dist/es5/wip/lib/wfs/parse-wfs.js.map +1 -0
  35. package/dist/es5/wip/lib/wmts/parse-wmts.js.map +1 -0
  36. package/dist/es5/wip/services/arcgis-feature-service.js.map +1 -0
  37. package/dist/es5/wip/wcs-capabilities-loader.js +1 -1
  38. package/dist/es5/wip/wcs-capabilities-loader.js.map +1 -1
  39. package/dist/es5/wip/wfs-capabilities-loader.js +2 -2
  40. package/dist/es5/wip/wfs-capabilities-loader.js.map +1 -1
  41. package/dist/es5/wip/wms-feature-info-loader.js.map +1 -1
  42. package/dist/es5/wip/wmts-capabilities-loader.js +1 -1
  43. package/dist/es5/wip/wmts-capabilities-loader.js.map +1 -1
  44. package/dist/es5/wms-capabilities-loader.js +2 -4
  45. package/dist/es5/wms-capabilities-loader.js.map +1 -1
  46. package/dist/es5/wms-error-loader.js +2 -4
  47. package/dist/es5/wms-error-loader.js.map +1 -1
  48. package/dist/esm/csw-capabilities-loader.js +1 -2
  49. package/dist/esm/csw-capabilities-loader.js.map +1 -1
  50. package/dist/esm/csw-domain-loader.js +1 -2
  51. package/dist/esm/csw-domain-loader.js.map +1 -1
  52. package/dist/esm/csw-records-loader.js +2 -2
  53. package/dist/esm/csw-records-loader.js.map +1 -1
  54. package/dist/esm/gml-loader.js +1 -2
  55. package/dist/esm/gml-loader.js.map +1 -1
  56. package/dist/esm/index.js +8 -7
  57. package/dist/esm/index.js.map +1 -1
  58. package/dist/esm/lerc-loader.js +1 -2
  59. package/dist/esm/lerc-loader.js.map +1 -1
  60. package/dist/esm/lib/parsers/gml/parse-gml.js.map +1 -1
  61. package/dist/esm/lib/services/create-image-service.js +27 -0
  62. package/dist/esm/lib/services/create-image-service.js.map +1 -0
  63. package/dist/esm/lib/services/{generic/image-service.js → image-service.js} +1 -1
  64. package/dist/esm/lib/services/image-service.js.map +1 -0
  65. package/dist/esm/{lib/services → services}/arcgis/arcgis-image-service.js +7 -5
  66. package/dist/esm/services/arcgis/arcgis-image-service.js.map +1 -0
  67. package/dist/esm/services/arcgis/arcgis-server.js.map +1 -0
  68. package/dist/esm/services/create-image-source.js +8 -0
  69. package/dist/esm/services/create-image-source.js.map +1 -0
  70. package/dist/esm/{lib/services → services}/ogc/csw-service.js +9 -7
  71. package/dist/esm/services/ogc/csw-service.js.map +1 -0
  72. package/dist/esm/{lib/services → services}/ogc/wms-service.js +15 -11
  73. package/dist/esm/services/ogc/wms-service.js.map +1 -0
  74. package/dist/esm/wip/lib/wfs/parse-wfs.js.map +1 -0
  75. package/dist/esm/wip/lib/wmts/parse-wmts.js.map +1 -0
  76. package/dist/esm/wip/services/arcgis-feature-service.js.map +1 -0
  77. package/dist/esm/wip/wcs-capabilities-loader.js +1 -1
  78. package/dist/esm/wip/wcs-capabilities-loader.js.map +1 -1
  79. package/dist/esm/wip/wfs-capabilities-loader.js +2 -2
  80. package/dist/esm/wip/wfs-capabilities-loader.js.map +1 -1
  81. package/dist/esm/wip/wms-feature-info-loader.js.map +1 -1
  82. package/dist/esm/wip/wmts-capabilities-loader.js +1 -1
  83. package/dist/esm/wip/wmts-capabilities-loader.js.map +1 -1
  84. package/dist/esm/wms-capabilities-loader.js +1 -2
  85. package/dist/esm/wms-capabilities-loader.js.map +1 -1
  86. package/dist/esm/wms-error-loader.js +1 -2
  87. package/dist/esm/wms-error-loader.js.map +1 -1
  88. package/dist/gml-loader.d.ts +2 -18
  89. package/dist/gml-loader.d.ts.map +1 -1
  90. package/dist/index.d.ts +11 -10
  91. package/dist/index.d.ts.map +1 -1
  92. package/dist/lerc-loader.d.ts +1 -14
  93. package/dist/lerc-loader.d.ts.map +1 -1
  94. package/dist/lib/parsers/gml/parse-gml.d.ts +1 -0
  95. package/dist/lib/parsers/gml/parse-gml.d.ts.map +1 -1
  96. package/dist/lib/services/create-image-service.d.ts +14 -0
  97. package/dist/lib/services/create-image-service.d.ts.map +1 -0
  98. package/dist/lib/services/{generic/image-service.d.ts → image-service.d.ts} +4 -4
  99. package/dist/lib/services/image-service.d.ts.map +1 -0
  100. package/dist/{lib/services → services}/arcgis/arcgis-image-service.d.ts +6 -7
  101. package/dist/services/arcgis/arcgis-image-service.d.ts.map +1 -0
  102. package/dist/services/arcgis/arcgis-server.d.ts.map +1 -0
  103. package/dist/services/create-image-source.d.ts +18 -0
  104. package/dist/services/create-image-source.d.ts.map +1 -0
  105. package/dist/{lib/services → services}/ogc/csw-service.d.ts +6 -38
  106. package/dist/services/ogc/csw-service.d.ts.map +1 -0
  107. package/dist/{lib/services → services}/ogc/wms-service.d.ts +14 -80
  108. package/dist/services/ogc/wms-service.d.ts.map +1 -0
  109. package/dist/wip/lib/wfs/parse-wfs.d.ts.map +1 -0
  110. package/dist/wip/lib/wmts/parse-wmts.d.ts.map +1 -0
  111. package/dist/wip/services/arcgis-feature-service.d.ts.map +1 -0
  112. package/dist/wip/wfs-capabilities-loader.d.ts +1 -16
  113. package/dist/wip/wfs-capabilities-loader.d.ts.map +1 -1
  114. package/dist/wip/wms-feature-info-loader.d.ts +1 -15
  115. package/dist/wip/wms-feature-info-loader.d.ts.map +1 -1
  116. package/dist/wip/wms-layer-description-loader.d.ts +20 -6
  117. package/dist/wip/wms-layer-description-loader.d.ts.map +1 -1
  118. package/dist/wms-capabilities-loader.d.ts +2 -17
  119. package/dist/wms-capabilities-loader.d.ts.map +1 -1
  120. package/dist/wms-error-loader.d.ts +1 -21
  121. package/dist/wms-error-loader.d.ts.map +1 -1
  122. package/package.json +6 -9
  123. package/src/csw-capabilities-loader.ts +1 -4
  124. package/src/csw-domain-loader.ts +1 -3
  125. package/src/csw-records-loader.ts +2 -3
  126. package/src/gml-loader.ts +2 -3
  127. package/src/index.ts +14 -10
  128. package/src/lerc-loader.ts +1 -3
  129. package/src/lib/parsers/gml/parse-gml.ts +2 -0
  130. package/src/lib/services/create-image-service.ts +55 -0
  131. package/src/lib/services/{generic/image-service.ts → image-service.ts} +6 -4
  132. package/src/{lib/services → services}/arcgis/arcgis-image-service.ts +15 -8
  133. package/src/services/create-image-source.ts +31 -0
  134. package/src/{lib/services → services}/ogc/csw-service.ts +11 -11
  135. package/src/{lib/services → services}/ogc/wms-service.ts +27 -34
  136. package/src/wip/wfs-capabilities-loader.ts +2 -2
  137. package/src/wip/wms-feature-info-loader.ts +2 -1
  138. package/src/wms-capabilities-loader.ts +6 -4
  139. package/src/wms-error-loader.ts +1 -3
  140. package/dist/bundle.js +0 -6
  141. package/dist/csw-capabilities-loader.js +0 -31
  142. package/dist/csw-domain-loader.js +0 -31
  143. package/dist/csw-records-loader.js +0 -30
  144. package/dist/es5/lib/create-image-source.js.map +0 -1
  145. package/dist/es5/lib/services/arcgis/arcgis-image-service.js.map +0 -1
  146. package/dist/es5/lib/services/arcgis/arcgis-server.js.map +0 -1
  147. package/dist/es5/lib/services/generic/image-service.js.map +0 -1
  148. package/dist/es5/lib/services/ogc/csw-service.js.map +0 -1
  149. package/dist/es5/lib/services/ogc/wms-service.js.map +0 -1
  150. package/dist/es5/lib/sources/data-source.js +0 -67
  151. package/dist/es5/lib/sources/data-source.js.map +0 -1
  152. package/dist/es5/lib/sources/image-source.js +0 -26
  153. package/dist/es5/lib/sources/image-source.js.map +0 -1
  154. package/dist/es5/lib/sources/tile-source.js +0 -26
  155. package/dist/es5/lib/sources/tile-source.js.map +0 -1
  156. package/dist/es5/lib/sources/utils/utils.js +0 -36
  157. package/dist/es5/lib/sources/utils/utils.js.map +0 -1
  158. package/dist/es5/lib/wfs/parse-wfs.js.map +0 -1
  159. package/dist/es5/lib/wmts/parse-wmts.js.map +0 -1
  160. package/dist/es5/wip/arcgis-feature-service.js.map +0 -1
  161. package/dist/esm/lib/create-image-source.js +0 -27
  162. package/dist/esm/lib/create-image-source.js.map +0 -1
  163. package/dist/esm/lib/services/arcgis/arcgis-image-service.js.map +0 -1
  164. package/dist/esm/lib/services/arcgis/arcgis-server.js.map +0 -1
  165. package/dist/esm/lib/services/generic/image-service.js.map +0 -1
  166. package/dist/esm/lib/services/ogc/csw-service.js.map +0 -1
  167. package/dist/esm/lib/services/ogc/wms-service.js.map +0 -1
  168. package/dist/esm/lib/sources/data-source.js +0 -43
  169. package/dist/esm/lib/sources/data-source.js.map +0 -1
  170. package/dist/esm/lib/sources/image-source.js +0 -3
  171. package/dist/esm/lib/sources/image-source.js.map +0 -1
  172. package/dist/esm/lib/sources/tile-source.js +0 -3
  173. package/dist/esm/lib/sources/tile-source.js.map +0 -1
  174. package/dist/esm/lib/sources/utils/utils.js +0 -21
  175. package/dist/esm/lib/sources/utils/utils.js.map +0 -1
  176. package/dist/esm/lib/wfs/parse-wfs.js.map +0 -1
  177. package/dist/esm/lib/wmts/parse-wmts.js.map +0 -1
  178. package/dist/esm/wip/arcgis-feature-service.js.map +0 -1
  179. package/dist/gml-loader.js +0 -31
  180. package/dist/index.js +0 -39
  181. package/dist/lerc-loader.js +0 -56
  182. package/dist/lib/create-image-source.d.ts +0 -17
  183. package/dist/lib/create-image-source.d.ts.map +0 -1
  184. package/dist/lib/create-image-source.js +0 -39
  185. package/dist/lib/parsers/csw/parse-csw-capabilities.js +0 -24
  186. package/dist/lib/parsers/csw/parse-csw-domain.js +0 -33
  187. package/dist/lib/parsers/csw/parse-csw-records.js +0 -58
  188. package/dist/lib/parsers/csw/parse-exception-report.js +0 -30
  189. package/dist/lib/parsers/gml/deep-strict-equal.js +0 -119
  190. package/dist/lib/parsers/gml/parse-gml.js +0 -371
  191. package/dist/lib/parsers/lerc/lerc-types.js +0 -3
  192. package/dist/lib/parsers/wms/parse-wms-capabilities.js +0 -233
  193. package/dist/lib/parsers/wms/parse-wms-error.js +0 -22
  194. package/dist/lib/parsers/wms/parse-wms-features.js +0 -27
  195. package/dist/lib/parsers/wms/parse-wms-layer-description.js +0 -15
  196. package/dist/lib/parsers/xml/parse-xml-helpers.js +0 -68
  197. package/dist/lib/services/arcgis/arcgis-image-service.d.ts.map +0 -1
  198. package/dist/lib/services/arcgis/arcgis-image-service.js +0 -94
  199. package/dist/lib/services/arcgis/arcgis-server.d.ts.map +0 -1
  200. package/dist/lib/services/arcgis/arcgis-server.js +0 -42
  201. package/dist/lib/services/generic/image-service.d.ts.map +0 -1
  202. package/dist/lib/services/generic/image-service.js +0 -47
  203. package/dist/lib/services/ogc/csw-service.d.ts.map +0 -1
  204. package/dist/lib/services/ogc/csw-service.js +0 -168
  205. package/dist/lib/services/ogc/wms-service.d.ts.map +0 -1
  206. package/dist/lib/services/ogc/wms-service.js +0 -317
  207. package/dist/lib/sources/data-source.d.ts +0 -32
  208. package/dist/lib/sources/data-source.d.ts.map +0 -1
  209. package/dist/lib/sources/data-source.js +0 -56
  210. package/dist/lib/sources/image-source.d.ts +0 -79
  211. package/dist/lib/sources/image-source.d.ts.map +0 -1
  212. package/dist/lib/sources/image-source.js +0 -13
  213. package/dist/lib/sources/tile-source.d.ts +0 -56
  214. package/dist/lib/sources/tile-source.d.ts.map +0 -1
  215. package/dist/lib/sources/tile-source.js +0 -13
  216. package/dist/lib/sources/utils/utils.d.ts +0 -13
  217. package/dist/lib/sources/utils/utils.d.ts.map +0 -1
  218. package/dist/lib/sources/utils/utils.js +0 -38
  219. package/dist/lib/wfs/parse-wfs.d.ts.map +0 -1
  220. package/dist/lib/wfs/parse-wfs.js +0 -32
  221. package/dist/lib/wmts/parse-wmts.d.ts.map +0 -1
  222. package/dist/lib/wmts/parse-wmts.js +0 -35
  223. package/dist/wip/arcgis-feature-service.d.ts.map +0 -1
  224. package/dist/wip/arcgis-feature-service.js +0 -28
  225. package/dist/wip/data-source.js +0 -59
  226. package/dist/wip/lib/wcs/parse-wcs-capabilities.js +0 -15
  227. package/dist/wip/lib/wfs/parse-wfs-capabilities.js +0 -19
  228. package/dist/wip/lib/wmts/parse-wmts-capabilities.js +0 -77
  229. package/dist/wip/wcs-capabilities-loader.js +0 -31
  230. package/dist/wip/wfs-capabilities-loader.js +0 -31
  231. package/dist/wip/wms-feature-info-loader.js +0 -17
  232. package/dist/wip/wms-layer-description-loader.js +0 -17
  233. package/dist/wip/wmts-capabilities-loader.js +0 -32
  234. package/dist/wms-capabilities-loader.js +0 -35
  235. package/dist/wms-error-loader.js +0 -43
  236. package/src/lib/create-image-source.ts +0 -48
  237. package/src/lib/sources/data-source.ts +0 -73
  238. package/src/lib/sources/image-source.ts +0 -92
  239. package/src/lib/sources/tile-source.ts +0 -61
  240. package/src/lib/sources/utils/utils.ts +0 -42
  241. /package/dist/es5/{lib/services → services}/arcgis/arcgis-server.js +0 -0
  242. /package/dist/es5/{lib → wip/lib}/wfs/parse-wfs.js +0 -0
  243. /package/dist/es5/{lib → wip/lib}/wmts/parse-wmts.js +0 -0
  244. /package/dist/es5/wip/{arcgis-feature-service.js → services/arcgis-feature-service.js} +0 -0
  245. /package/dist/es5/{lib/services/ogc → wip/services}/wmts-service.ts.disabled +0 -0
  246. /package/dist/esm/{lib/services → services}/arcgis/arcgis-server.js +0 -0
  247. /package/dist/esm/{lib → wip/lib}/wfs/parse-wfs.js +0 -0
  248. /package/dist/esm/{lib → wip/lib}/wmts/parse-wmts.js +0 -0
  249. /package/dist/esm/wip/{arcgis-feature-service.js → services/arcgis-feature-service.js} +0 -0
  250. /package/dist/esm/{lib/services/ogc → wip/services}/wmts-service.ts.disabled +0 -0
  251. /package/dist/{lib/services → services}/arcgis/arcgis-server.d.ts +0 -0
  252. /package/dist/{lib → wip/lib}/wfs/parse-wfs.d.ts +0 -0
  253. /package/dist/{lib → wip/lib}/wmts/parse-wmts.d.ts +0 -0
  254. /package/dist/wip/{arcgis-feature-service.d.ts → services/arcgis-feature-service.d.ts} +0 -0
  255. /package/src/{lib/services → services}/arcgis/arcgis-server.ts +0 -0
  256. /package/src/{lib → wip/lib}/wfs/parse-wfs.ts +0 -0
  257. /package/src/{lib → wip/lib}/wmts/parse-wmts.ts +0 -0
  258. /package/src/wip/{arcgis-feature-service.ts → services/arcgis-feature-service.ts} +0 -0
  259. /package/src/{lib/services/ogc → wip/services}/wmts-service.ts.disabled +0 -0
@@ -1,13 +0,0 @@
1
- "use strict";
2
- // loaders.gl, MIT license
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.ImageSource = void 0;
5
- const data_source_1 = require("./data-source");
6
- /**
7
- * MapImageSource - data sources that allow data to be queried by (geospatial) extents
8
- * @note
9
- * - If geospatial, bounding box is expected to be in web mercator coordinates
10
- */
11
- class ImageSource extends data_source_1.DataSource {
12
- }
13
- exports.ImageSource = ImageSource;
@@ -1,56 +0,0 @@
1
- import type { ImageType } from '@loaders.gl/images';
2
- import { DataSource, DataSourceProps } from './data-source';
3
- /**
4
- * Normalized capabilities of an Image service
5
- * @example
6
- * The WMSService will normalize the response to the WMS `GetCapabilities` data structure extracted from WMS XML response
7
- * into an TileSourceMetadata.
8
- */
9
- export type TileSourceMetadata = {
10
- name: string;
11
- title?: string;
12
- abstract?: string;
13
- keywords: string[];
14
- layer: {
15
- name: string;
16
- title?: string;
17
- srs?: string[];
18
- boundingBox?: [number, number, number, number];
19
- layers: TileSourceLayer[];
20
- };
21
- };
22
- export type TileSourceLayer = {
23
- name: string;
24
- title?: string;
25
- srs?: string[];
26
- boundingBox?: [number, number, number, number];
27
- layers: TileSourceLayer[];
28
- };
29
- export type GetTileParameters = {
30
- /** Layers to render */
31
- layers: string | string[];
32
- /** Styling */
33
- styles?: unknown;
34
- /** bounding box of the requested map image */
35
- zoom: number;
36
- /** tile x coordinate */
37
- x: number;
38
- /** tile y coordinate */
39
- y: number;
40
- /** srs for the image (not the bounding box) */
41
- srs?: string;
42
- /** requested format for the return image */
43
- format?: 'image/png';
44
- };
45
- type TileSourceProps = DataSourceProps;
46
- /**
47
- * MapTileSource - data sources that allow data to be queried by (geospatial) extents
48
- * @note
49
- * - If geospatial, bounding box is expected to be in web mercator coordinates
50
- */
51
- export declare abstract class TileSource<PropsT extends TileSourceProps> extends DataSource<PropsT> {
52
- abstract getMetadata(): Promise<TileSourceMetadata>;
53
- abstract getTile(parameters: GetTileParameters): Promise<ImageType>;
54
- }
55
- export {};
56
- //# sourceMappingURL=tile-source.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tile-source.d.ts","sourceRoot":"","sources":["../../../src/lib/sources/tile-source.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAC,UAAU,EAAE,eAAe,EAAC,MAAM,eAAe,CAAC;AAE1D;;;;;GAKG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,KAAK,EAAE;QACL,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,GAAG,CAAC,EAAE,MAAM,EAAE,CAAC;QACf,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;QAC/C,MAAM,EAAE,eAAe,EAAE,CAAC;KAC3B,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,EAAE,CAAC;IACf,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/C,MAAM,EAAE,eAAe,EAAE,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,uBAAuB;IACvB,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC1B,cAAc;IACd,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,8CAA8C;IAC9C,IAAI,EAAE,MAAM,CAAC;IACb,wBAAwB;IACxB,CAAC,EAAE,MAAM,CAAC;IACV,wBAAwB;IACxB,CAAC,EAAE,MAAM,CAAC;IACV,+CAA+C;IAC/C,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,4CAA4C;IAC5C,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB,CAAC;AAEF,KAAK,eAAe,GAAG,eAAe,CAAC;AAEvC;;;;GAIG;AACH,8BAAsB,UAAU,CAAC,MAAM,SAAS,eAAe,CAAE,SAAQ,UAAU,CAAC,MAAM,CAAC;IACzF,QAAQ,CAAC,WAAW,IAAI,OAAO,CAAC,kBAAkB,CAAC;IACnD,QAAQ,CAAC,OAAO,CAAC,UAAU,EAAE,iBAAiB,GAAG,OAAO,CAAC,SAAS,CAAC;CACpE"}
@@ -1,13 +0,0 @@
1
- "use strict";
2
- // loaders.gl, MIT license
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.TileSource = void 0;
5
- const data_source_1 = require("./data-source");
6
- /**
7
- * MapTileSource - data sources that allow data to be queried by (geospatial) extents
8
- * @note
9
- * - If geospatial, bounding box is expected to be in web mercator coordinates
10
- */
11
- class TileSource extends data_source_1.DataSource {
12
- }
13
- exports.TileSource = TileSource;
@@ -1,13 +0,0 @@
1
- import type { LoaderOptions } from '@loaders.gl/loader-utils';
2
- /**
3
- * Gets the current fetch function from options
4
- * @todo - move to loader-utils module
5
- * @todo - use in core module counterpart
6
- * @param options
7
- * @param context
8
- */
9
- export declare function getFetchFunction(options?: LoaderOptions): (url: string, fetchOptions?: RequestInit) => Promise<Response>;
10
- export declare function mergeImageServiceProps<Props extends {
11
- loadOptions?: any;
12
- }>(props: Props): Required<Props>;
13
- //# sourceMappingURL=utils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/lib/sources/utils/utils.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,0BAA0B,CAAC;AAE5D;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,CAAC,EAAE,aAAa,SAKvC,MAAM,iBAAiB,WAAW,uBAWlD;AAED,wBAAgB,sBAAsB,CAAC,KAAK,SAAS;IAAC,WAAW,CAAC,EAAE,GAAG,CAAA;CAAC,EACtE,KAAK,EAAE,KAAK,GACX,QAAQ,CAAC,KAAK,CAAC,CAUjB"}
@@ -1,38 +0,0 @@
1
- "use strict";
2
- // loaders.gl, MIT license
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.mergeImageServiceProps = exports.getFetchFunction = void 0;
5
- /**
6
- * Gets the current fetch function from options
7
- * @todo - move to loader-utils module
8
- * @todo - use in core module counterpart
9
- * @param options
10
- * @param context
11
- */
12
- function getFetchFunction(options) {
13
- const fetchFunction = options?.fetch;
14
- // options.fetch can be a function
15
- if (fetchFunction && typeof fetchFunction === 'function') {
16
- return (url, fetchOptions) => fetchFunction(url, fetchOptions);
17
- }
18
- // options.fetch can be an options object, use global fetch with those options
19
- const fetchOptions = options?.fetch;
20
- if (fetchOptions && typeof fetchOptions !== 'function') {
21
- return (url) => fetch(url, fetchOptions);
22
- }
23
- // else return the global fetch function
24
- return (url) => fetch(url);
25
- }
26
- exports.getFetchFunction = getFetchFunction;
27
- function mergeImageServiceProps(props) {
28
- // @ts-expect-error
29
- return {
30
- // Default fetch
31
- ...props,
32
- loadOptions: {
33
- ...props.loadOptions,
34
- fetch: getFetchFunction(props.loadOptions)
35
- }
36
- };
37
- }
38
- exports.mergeImageServiceProps = mergeImageServiceProps;
@@ -1 +0,0 @@
1
- {"version":3,"file":"parse-wfs.d.ts","sourceRoot":"","sources":["../../../src/lib/wfs/parse-wfs.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,eAAe,GAAG,EAAE,CAAC;AAEjC;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,KAAA,GAAG,eAAe,CAM3E"}
@@ -1,32 +0,0 @@
1
- "use strict";
2
- // loaders.gl, MIT license
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.parseWFSCapabilities = void 0;
5
- const xml_1 = require("@loaders.gl/xml");
6
- /**
7
- * Parses a typed data structure from raw XML for `GetCapabilities` response
8
- * @note Error handlings is fairly weak
9
- */
10
- function parseWFSCapabilities(text, options) {
11
- // Remove namespaces in XML
12
- options = { ...options, xml: { ...options?.xml, removeNSPrefix: true } };
13
- const parsedXML = xml_1.XMLLoader.parseTextSync?.(text, options);
14
- const xmlCapabilities = parsedXML.Capabilities || parsedXML;
15
- return uncapitalizeKeys(xmlCapabilities);
16
- }
17
- exports.parseWFSCapabilities = parseWFSCapabilities;
18
- /** Uncapitalize all keys of an object */
19
- function uncapitalizeKeys(object) {
20
- if (object && typeof object === 'object') {
21
- const newObject = {};
22
- for (const [key, value] of Object.entries(object)) {
23
- newObject[uncapitalize(key)] = uncapitalizeKeys(value);
24
- }
25
- return newObject;
26
- }
27
- return object;
28
- }
29
- /** Uncapitalize first letter of a string */
30
- function uncapitalize(str) {
31
- return typeof str === 'string' ? str.charAt(0).toLowerCase() + str.slice(1) : str;
32
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"parse-wmts.d.ts","sourceRoot":"","sources":["../../../src/lib/wmts/parse-wmts.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAElC;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,KAAA,GAAG,gBAAgB,CAM7E"}
@@ -1,35 +0,0 @@
1
- "use strict";
2
- // loaders.gl, MIT license
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.parseWMTSCapabilities = void 0;
5
- const xml_1 = require("@loaders.gl/xml");
6
- /**
7
- * Parses a typed data structure from raw XML for `GetCapabilities` response
8
- * @note Error handlings is fairly weak
9
- */
10
- function parseWMTSCapabilities(text, options) {
11
- // Remove namespaces in XML
12
- options = { ...options, xml: { ...options?.xml, removeNSPrefix: true } };
13
- const parsedXML = xml_1.XMLLoader.parseTextSync?.(text, options);
14
- const xmlCapabilities = parsedXML.Capabilities || parsedXML;
15
- return uncapitalizeKeys(xmlCapabilities);
16
- }
17
- exports.parseWMTSCapabilities = parseWMTSCapabilities;
18
- function uncapitalizeKeys(object) {
19
- if (object && typeof object === 'object') {
20
- const newObject = {};
21
- for (const [key, value] of Object.entries(object)) {
22
- newObject[uncapitalize(key)] = uncapitalizeKeys(value);
23
- }
24
- return newObject;
25
- }
26
- return object;
27
- }
28
- /**
29
- * Uncapitalize first letter of a string
30
- * @param {string} str
31
- * @returns {string}
32
- */
33
- function uncapitalize(str) {
34
- return typeof str === 'string' ? str.charAt(0).toLowerCase() + str.slice(1) : str;
35
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"arcgis-feature-service.d.ts","sourceRoot":"","sources":["../../src/wip/arcgis-feature-service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,aAAa,EAAC,MAAM,0BAA0B,CAAC;AAGvD,KAAK,SAAS,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;AAE3E,MAAM,MAAM,8BAA8B,GAAG;IAC3C,cAAc,EAAE,OAAO,CAAC;IACxB,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,IAAI,CAAC;IACZ,SAAS,EAAE,MAAM,GAAG,GAAG,CAAC;IACxB,IAAI,EAAE,IAAI,CAAC;IACX,QAAQ,EAAE,GAAG,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,OAAO,EAAE,EAAE,CAAC;IAC/C,YAAY,EAAE,sBAAsB,CAAC;IACrC,UAAU,EAAE,0BAA0B,CAAC;IACvC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,CAAC,CAAC,EAAE,SAAS,CAAC;CACf,CAAA;AAgBD,MAAM,MAAM,yBAAyB,GAAG,8BAA8B,GAAG;IACvE,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,CAAC,EAAE,aAAa,CAAC;IAC5B,KAAK,CAAC,EAAE,OAAO,KAAK,GAAG,SAAS,CAAC;CAClC,CAAC;AAEF,qBAAa,oBAAoB;IAC/B,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,aAAa,CAAC;IAC3B,KAAK,EAAE,OAAO,KAAK,GAAG,SAAS,CAAC;gBAEpB,KAAK,EAAE,yBAAyB;IAQ5C,WAAW,CAAC,OAAO,EAAE;QAAC,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAC,GAAG,MAAM;IAIpE;;;;;OAKG;IACH,cAAc,CAAC,OAAO,EAAE;QACtB,WAAW,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;QAC9C,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;QACf,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,IAAI,CAAC,EAAE,KAAK,CAAC;QACb,CAAC,CAAC,EAAE,SAAS,CAAC;QACd,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,MAAM,CAAC,EAAE,KAAK,CAAC;QACf,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;QAC5C,aAAa,CAAC,EAAE,sBAAsB,CAAC;QACvC,WAAW,CAAC,EAAE,KAAK,CAAA;QACnB,kBAAkB,CAAC,EAAE,KAAK,CAAC;QAC3B,OAAO,CAAC,EAAE,KAAK,CAAC;QAChB,UAAU,CAAC,EAAE,KAAK,CAAC;QACnB,aAAa,CAAC,EAAE,KAAK,CAAC;QACtB,CAAC,CAAC,EAAE,OAAO,CAAC;KACb,GAAG,MAAM;CAMX"}
@@ -1,28 +0,0 @@
1
- "use strict";
2
- // @ts-nocheck
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.ArcGISFeatureService = void 0;
5
- class ArcGISFeatureService {
6
- constructor(props) {
7
- this.url = props.url;
8
- this.loadOptions = props.loadOptions || {};
9
- this.fetch = props.fetch || fetch;
10
- }
11
- // URL creators
12
- metadataURL(options) {
13
- return this.getUrl({ ...options });
14
- }
15
- /**
16
- * Form a URL to an ESRI FeatureServer
17
- // https://services2.arcgis.com/CcI36Pduqd0OR4W9/ArcGIS/rest/services/Bicycle_Routes_Public/FeatureServer/0/query?
18
- // returnGeometry=true&where=1%3D1&outSR=4326&outFields=*&inSR=4326&geometry=${-90}%2C+${30}%2C+${-70}%2C+${50}&
19
- // geometryType=esriGeometryEnvelope&spatialRel=esriSpatialRelIntersects&geometryPrecision=6&resultType=tile&f=geojson`
20
- */
21
- exportImageURL(options) {
22
- const { boundingBox } = options;
23
- // const bbox = `bbox=${boundingBox[0]},${boundingBox[1]},${boundingBox[2]},${boundingBox[3]}`;
24
- // const size = `size=${width},${height}`
25
- return this.getUrl({ path: 'exportImage', });
26
- }
27
- }
28
- exports.ArcGISFeatureService = ArcGISFeatureService;
@@ -1,59 +0,0 @@
1
- "use strict";
2
- // loaders.gl, MIT license
3
- /** General data source class */
4
- // export abstract class DataSource {};
5
- // export type DataSourceMetadata = {};
6
- // ImageSource
7
- // Tile Source
8
- /** Data source that serves data by tile index *
9
- export abstract class TileDataSource extends DataSource {};
10
-
11
- // Image Tile Data Source
12
-
13
- export type ImageTileDataSourceCapabilities = {
14
- }
15
-
16
- export type ImageTile = Record<string, any>;
17
-
18
- export type FeatureInfo = {};
19
-
20
- export abstract class ImageTileDataSource extends TileDataSource {
21
- source: ImageDataSource;
22
-
23
- constructor(source: ImageDataSource) {
24
- super();
25
- this.source = source;
26
- }
27
-
28
- getCapabilities(): Promise<ImageTileDataSourceCapabilities> {
29
- return this.source.getCapabilities();
30
- }
31
-
32
- getTile({x, y, z, width, height, layers, parameters}): Promise<ImageType> {
33
- const boundingBox = this.getBoundingBoxFromTileIndex(x, y, z);
34
- return this.source.getImage({boundingBox, width, height, layers, parameters});
35
- }
36
-
37
- getFeatureInfo(): FeatureInfo | null {
38
- return null;
39
- }
40
-
41
- getBoundingBoxFromTileIndex(x: number, y: number, z: number): [number, number, number, number] {
42
- return [0, 0, 1, 1];
43
- }
44
- }
45
-
46
- // Vector Tile Source
47
-
48
- export type VectorTileDataSourceCapabilities = {
49
- // check tile.json
50
- }
51
-
52
- export type VectorTile = Record<string, any>;
53
-
54
- export abstract class VectorTileDataSource extends TileDataSource {
55
- abstract getCapabilities(): Promise<VectorTileDataSourceCapabilities>;
56
- abstract getTile({x, y, z, width, height, layers, parameters}): Promise<VectorTile>;
57
- }
58
-
59
- */
@@ -1,15 +0,0 @@
1
- "use strict";
2
- // loaders.gl, MIT license
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.parseWCSCapabilities = void 0;
5
- const xml_1 = require("@loaders.gl/xml");
6
- /**
7
- * Parses a typed data structure from raw XML for `GetCapabilities` response
8
- * @note Error handlings is fairly weak
9
- */
10
- function parseWCSCapabilities(text, options) {
11
- const parsedXML = xml_1.XMLLoader.parseTextSync?.(text, { ...options, xml: { ...options?.xml, removeNSPrefix: true } });
12
- const xmlCapabilities = parsedXML.Capabilities || parsedXML;
13
- return xmlCapabilities;
14
- }
15
- exports.parseWCSCapabilities = parseWCSCapabilities;
@@ -1,19 +0,0 @@
1
- "use strict";
2
- // loaders.gl, MIT license
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.parseWFSCapabilities = void 0;
5
- const xml_1 = require("@loaders.gl/xml");
6
- /**
7
- * Parses a typed data structure from raw XML for `GetCapabilities` response
8
- * @note Error handlings is fairly weak
9
- */
10
- function parseWFSCapabilities(text, options) {
11
- const parsedXML = xml_1.XMLLoader.parseTextSync?.(text, { ...options, xml: {
12
- ...options?.xml,
13
- removeNSPrefix: true,
14
- uncapitalizeKeys: true
15
- } });
16
- const xmlCapabilities = parsedXML.Capabilities || parsedXML;
17
- return xmlCapabilities;
18
- }
19
- exports.parseWFSCapabilities = parseWFSCapabilities;
@@ -1,77 +0,0 @@
1
- "use strict";
2
- // loaders.gl, MIT license
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.parseWMTSCapabilities = void 0;
5
- const xml_1 = require("@loaders.gl/xml");
6
- /**
7
- * Parses a typed data structure from raw XML for `GetCapabilities` response
8
- * @note Error handlings is fairly weak
9
- */
10
- function parseWMTSCapabilities(text, options) {
11
- const parsedXML = xml_1.XMLLoader.parseTextSync?.(text, { ...options, xml: {
12
- ...options?.xml,
13
- removeNSPrefix: true,
14
- uncapitalizeKeys: true
15
- } });
16
- const xmlCapabilities = parsedXML.Capabilities || parsedXML;
17
- return xmlCapabilities;
18
- }
19
- exports.parseWMTSCapabilities = parseWMTSCapabilities;
20
- /**
21
- * Parses a typed data structure from raw XML for `GetCapabilities` response
22
- * @note Error handlings is fairly weak
23
- */
24
- // export function parseWMTSCapabilities(text: string, options): WMTSCapabilities {
25
- // const parsedXML = XMLLoader.parseTextSync(text, options);
26
- // const xmlCapabilities: any =
27
- // parsedXML.WMT_MS_Capabilities || parsedXML.WMS_Capabilities || parsedXML;
28
- // return extractCapabilities(xmlCapabilities);
29
- // }
30
- /** Extract typed capability data from XML */
31
- // function extractCapabilities(xml: any): WMTSCapabilities {
32
- // const capabilities: WMTSCapabilities = {
33
- // name: xml.Service?.Name || 'unnamed',
34
- // title: xml.Service?.Title,
35
- // keywords: [],
36
- // requests: {},
37
- // layer: extractLayer(xml.Capability?.Layer),
38
- // raw: xml
39
- // };
40
- // for (const keyword of xml.Service?.KeywordList?.Keyword || []) {
41
- // capabilities.keywords.push(keyword);
42
- // }
43
- // for (const [name, xmlRequest] of Object.entries(xml.Capability?.Request || {})) {
44
- // capabilities.requests[name] = extractRequest(name, xmlRequest);
45
- // }
46
- // return capabilities;
47
- // }
48
- // /** Extract typed request data from XML */
49
- // function extractRequest(name: string, xmlRequest: any): WMSRequest {
50
- // const format: string | string[] = xmlRequest?.Format;
51
- // const mimeTypes: string[] = Array.isArray(format) ? format : [format];
52
- // return {name, mimeTypes};
53
- // }
54
- // /** Extract request data */
55
- // function extractLayer(xmlLayer: any): WMSLayer {
56
- // const layer: WMSLayer = {
57
- // name: xmlLayer?.Name,
58
- // title: xmlLayer?.Title,
59
- // srs: xmlLayer?.SRS || [],
60
- // layers: []
61
- // };
62
- // // Single layer is not represented as array in XML
63
- // const xmlLayers = getXMLArray(xmlLayer?.Layer);
64
- // for (const xmlSubLayer of xmlLayers) {
65
- // layer.layers?.push(extractLayer(xmlSubLayer));
66
- // }
67
- // return layer;
68
- // }
69
- // function getXMLArray(xmlValue: any) {
70
- // if (Array.isArray(xmlValue)) {
71
- // return xmlValue;
72
- // }
73
- // if (xmlValue) {
74
- // return [xmlValue];
75
- // }
76
- // return [];
77
- // }
@@ -1,31 +0,0 @@
1
- "use strict";
2
- // loaders.gl, MIT license
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports._typecheckWFSCapabilitiesLoader = exports.WCSCapabilitiesLoader = void 0;
5
- const parse_wcs_capabilities_1 = require("./lib/wcs/parse-wcs-capabilities");
6
- // __VERSION__ is injected by babel-plugin-version-inline
7
- // @ts-ignore TS2304: Cannot find name '__VERSION__'.
8
- const VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';
9
- /**
10
- * Loader for the response to the WCS GetCapability request
11
- */
12
- exports.WCSCapabilitiesLoader = {
13
- id: 'wcs-capabilities',
14
- name: 'WFS Capabilities',
15
- module: 'wms',
16
- version: VERSION,
17
- worker: false,
18
- extensions: ['xml'],
19
- mimeTypes: ['application/vnd.ogc.wcs_xml', 'application/xml', 'text/xml'],
20
- testText: testXMLFile,
21
- options: {
22
- wms: {}
23
- },
24
- parse: async (arrayBuffer, options) => (0, parse_wcs_capabilities_1.parseWCSCapabilities)(new TextDecoder().decode(arrayBuffer), options),
25
- parseTextSync: (text, options) => (0, parse_wcs_capabilities_1.parseWCSCapabilities)(text, options)
26
- };
27
- function testXMLFile(text) {
28
- // TODO - There could be space first.
29
- return text.startsWith('<?xml');
30
- }
31
- exports._typecheckWFSCapabilitiesLoader = exports.WCSCapabilitiesLoader;
@@ -1,31 +0,0 @@
1
- "use strict";
2
- // loaders.gl, MIT license
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports._typecheckWFSCapabilitiesLoader = exports.WFSCapabilitiesLoader = void 0;
5
- const parse_wfs_capabilities_1 = require("./lib/wfs/parse-wfs-capabilities");
6
- // __VERSION__ is injected by babel-plugin-version-inline
7
- // @ts-ignore TS2304: Cannot find name '__VERSION__'.
8
- const VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';
9
- /**
10
- * Loader for the response to the WFS GetCapability request
11
- */
12
- exports.WFSCapabilitiesLoader = {
13
- id: 'wfs-capabilities',
14
- name: 'WFS Capabilities',
15
- module: 'wms',
16
- version: VERSION,
17
- worker: false,
18
- extensions: ['xml'],
19
- mimeTypes: ['application/vnd.ogc.wfs_xml', 'application/xml', 'text/xml'],
20
- testText: testXMLFile,
21
- options: {
22
- wms: {}
23
- },
24
- parse: async (arrayBuffer, options) => (0, parse_wfs_capabilities_1.parseWFSCapabilities)(new TextDecoder().decode(arrayBuffer), options),
25
- parseTextSync: (text, options) => (0, parse_wfs_capabilities_1.parseWFSCapabilities)(text, options)
26
- };
27
- function testXMLFile(text) {
28
- // TODO - There could be space first.
29
- return text.startsWith('<?xml');
30
- }
31
- exports._typecheckWFSCapabilitiesLoader = exports.WFSCapabilitiesLoader;
@@ -1,17 +0,0 @@
1
- "use strict";
2
- // loaders.gl, MIT license
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports._typecheckWMSFeatureInfoLoader = exports.WMSFeatureInfoLoader = void 0;
5
- const wms_capabilities_loader_1 = require("../wms-capabilities-loader");
6
- const parse_wms_features_1 = require("../lib/parsers/wms/parse-wms-features");
7
- /**
8
- * Loader for the response to the WMS GetFeatureInfo request
9
- */
10
- exports.WMSFeatureInfoLoader = {
11
- ...wms_capabilities_loader_1.WMSCapabilitiesLoader,
12
- id: 'wms-feature-info',
13
- name: 'WMS FeatureInfo',
14
- parse: async (arrayBuffer, options) => (0, parse_wms_features_1.parseWMSFeatureInfo)(new TextDecoder().decode(arrayBuffer), options),
15
- parseTextSync: (text, options) => (0, parse_wms_features_1.parseWMSFeatureInfo)(text, options)
16
- };
17
- exports._typecheckWMSFeatureInfoLoader = exports.WMSFeatureInfoLoader;
@@ -1,17 +0,0 @@
1
- "use strict";
2
- // loaders.gl, MIT license
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports._typecheckWMSFeatureInfoLoader = exports.WMSLayerDescriptionLoader = void 0;
5
- const wms_capabilities_loader_1 = require("../wms-capabilities-loader");
6
- const parse_wms_layer_description_1 = require("../lib/parsers/wms/parse-wms-layer-description");
7
- /**
8
- * Loader for the response to the WMS DescribeLayer request
9
- */
10
- exports.WMSLayerDescriptionLoader = {
11
- ...wms_capabilities_loader_1.WMSCapabilitiesLoader,
12
- id: 'wms-layer-description',
13
- name: 'WMS DescribeLayer',
14
- parse: async (arrayBuffer, options) => (0, parse_wms_layer_description_1.parseWMSLayerDescription)(new TextDecoder().decode(arrayBuffer), options),
15
- parseTextSync: (text, options) => (0, parse_wms_layer_description_1.parseWMSLayerDescription)(text, options)
16
- };
17
- exports._typecheckWMSFeatureInfoLoader = exports.WMSLayerDescriptionLoader;
@@ -1,32 +0,0 @@
1
- "use strict";
2
- // loaders.gl, MIT license
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports._typecheckWMTSCapabilitiesLoader = exports.WMTSCapabilitiesLoader = void 0;
5
- // import type {WMTSCapabilities} from './lib/wmts/parse-wmts-capabilities';
6
- const parse_wmts_capabilities_1 = require("./lib/wmts/parse-wmts-capabilities");
7
- // __VERSION__ is injected by babel-plugin-version-inline
8
- // @ts-ignore TS2304: Cannot find name '__VERSION__'.
9
- const VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';
10
- /**
11
- * Loader for the response to the WMTS GetCapability request
12
- */
13
- exports.WMTSCapabilitiesLoader = {
14
- id: 'wmts-capabilities',
15
- name: 'WMTS Capabilities',
16
- module: 'wms',
17
- version: VERSION,
18
- worker: false,
19
- extensions: ['xml'],
20
- mimeTypes: ['application/vnd.ogc.wmts_xml', 'application/xml', 'text/xml'],
21
- testText: testXMLFile,
22
- options: {
23
- wms: {}
24
- },
25
- parse: async (arrayBuffer, options) => (0, parse_wmts_capabilities_1.parseWMTSCapabilities)(new TextDecoder().decode(arrayBuffer), options),
26
- parseTextSync: (text, options) => (0, parse_wmts_capabilities_1.parseWMTSCapabilities)(text, options)
27
- };
28
- function testXMLFile(text) {
29
- // TODO - There could be space first.
30
- return text.startsWith('<?xml');
31
- }
32
- exports._typecheckWMTSCapabilitiesLoader = exports.WMTSCapabilitiesLoader;
@@ -1,35 +0,0 @@
1
- "use strict";
2
- // loaders.gl, MIT license
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports._typecheckWMSCapabilitiesLoader = exports.WMSCapabilitiesLoader = void 0;
5
- const parse_wms_capabilities_1 = require("./lib/parsers/wms/parse-wms-capabilities");
6
- // __VERSION__ is injected by babel-plugin-version-inline
7
- // @ts-ignore TS2304: Cannot find name '__VERSION__'.
8
- const VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';
9
- /**
10
- * Loader for the response to the WMS GetCapability request
11
- */
12
- exports.WMSCapabilitiesLoader = {
13
- id: 'wms-capabilities',
14
- name: 'WMS Capabilities',
15
- module: 'wms',
16
- version: VERSION,
17
- worker: false,
18
- extensions: ['xml'],
19
- mimeTypes: ['application/vnd.ogc.wms_xml', 'application/xml', 'text/xml'],
20
- testText: testXMLFile,
21
- options: {
22
- wms: {}
23
- },
24
- parse: async (arrayBuffer, options) =>
25
- // TODO pass in XML options
26
- (0, parse_wms_capabilities_1.parseWMSCapabilities)(new TextDecoder().decode(arrayBuffer), options?.wms),
27
- parseTextSync: (text, options) =>
28
- // TODO pass in XML options
29
- (0, parse_wms_capabilities_1.parseWMSCapabilities)(text, options?.wms)
30
- };
31
- function testXMLFile(text) {
32
- // TODO - There could be space first.
33
- return text.startsWith('<?xml');
34
- }
35
- exports._typecheckWMSCapabilitiesLoader = exports.WMSCapabilitiesLoader;
@@ -1,43 +0,0 @@
1
- "use strict";
2
- // loaders.gl, MIT license
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports._typecheckWMSErrorLoader = exports.WMSErrorLoader = void 0;
5
- const parse_wms_error_1 = require("./lib/parsers/wms/parse-wms-error");
6
- // __VERSION__ is injected by babel-plugin-version-inline
7
- // @ts-ignore TS2304: Cannot find name '__VERSION__'.
8
- const VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';
9
- /**
10
- * Loader for the response to the WMS GetCapability request
11
- */
12
- exports.WMSErrorLoader = {
13
- id: 'wms-error',
14
- name: 'WMS Error',
15
- module: 'wms',
16
- version: VERSION,
17
- worker: false,
18
- extensions: ['xml'],
19
- mimeTypes: ['application/vnd.ogc.se_xml', 'application/xml', 'text/xml'],
20
- testText: testXMLFile,
21
- options: {
22
- wms: {
23
- throwOnError: false
24
- }
25
- },
26
- parse: async (arrayBuffer, options) => parseTextSync(new TextDecoder().decode(arrayBuffer), options),
27
- parseSync: (arrayBuffer, options) => parseTextSync(new TextDecoder().decode(arrayBuffer), options),
28
- parseTextSync: (text, options) => parseTextSync(text, options)
29
- };
30
- function testXMLFile(text) {
31
- // TODO - There could be space first.
32
- return text.startsWith('<?xml');
33
- }
34
- function parseTextSync(text, options) {
35
- const wmsOptions = { ...exports.WMSErrorLoader.options.wms, ...options?.wms };
36
- const error = (0, parse_wms_error_1.parseWMSError)(text, wmsOptions);
37
- const message = wmsOptions.minimalErrors ? error : `WMS Service error: ${error}`;
38
- if (wmsOptions.throwOnError) {
39
- throw new Error(message);
40
- }
41
- return message;
42
- }
43
- exports._typecheckWMSErrorLoader = exports.WMSErrorLoader;