itowns 2.42.1-next.2 → 2.42.1-next.20

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 (180) hide show
  1. package/dist/debug.js +1 -1
  2. package/dist/debug.js.map +1 -1
  3. package/dist/itowns.js +1 -1
  4. package/dist/itowns.js.map +1 -1
  5. package/dist/itowns_widgets.js +1 -1
  6. package/dist/itowns_widgets.js.map +1 -1
  7. package/examples/{.eslintrc.js → .eslintrc.cjs} +1 -1
  8. package/examples/effects_stereo.html +2 -2
  9. package/examples/entwine_simple_loader.html +24 -8
  10. package/examples/misc_collada.html +2 -2
  11. package/examples/misc_instancing.html +1 -1
  12. package/examples/source_file_gpx_3d.html +2 -2
  13. package/examples/source_stream_wfs_25d.html +11 -11
  14. package/examples/source_stream_wfs_3d.html +1 -1
  15. package/examples/vector_tile_3d_mesh.html +2 -2
  16. package/examples/vector_tile_raster_2d.html +1 -1
  17. package/examples/vector_tile_raster_3d.html +1 -1
  18. package/examples/view_25d_map.html +2 -2
  19. package/examples/view_3d_map.html +3 -3
  20. package/examples/view_3d_map_webxr.html +1 -1
  21. package/examples/view_3d_mns_map.html +3 -3
  22. package/examples/view_immersive.html +1 -1
  23. package/examples/view_multi_25d.html +2 -2
  24. package/examples/widgets_minimap.html +1 -1
  25. package/examples/widgets_searchbar.html +2 -2
  26. package/lib/Controls/FirstPersonControls.js +5 -12
  27. package/lib/Controls/FlyControls.js +4 -13
  28. package/lib/Controls/GlobeControls.js +33 -43
  29. package/lib/Controls/PlanarControls.js +9 -20
  30. package/lib/Controls/StateControl.js +2 -11
  31. package/lib/Controls/StreetControls.js +14 -24
  32. package/lib/Converter/Feature2Mesh.js +77 -70
  33. package/lib/Converter/Feature2Texture.js +15 -25
  34. package/lib/Converter/convertToTile.js +16 -26
  35. package/lib/Converter/textureConverter.js +9 -19
  36. package/lib/Core/3DTiles/C3DTBatchTable.js +5 -13
  37. package/lib/Core/3DTiles/C3DTBatchTableHierarchyExtension.js +1 -8
  38. package/lib/Core/3DTiles/C3DTBoundingVolume.js +17 -27
  39. package/lib/Core/3DTiles/C3DTExtensions.js +1 -8
  40. package/lib/Core/3DTiles/C3DTFeature.js +3 -10
  41. package/lib/Core/3DTiles/C3DTilesEnums.js +3 -11
  42. package/lib/Core/3DTiles/C3DTileset.js +7 -16
  43. package/lib/Core/3DTiles/utils/BinaryPropertyAccessor.js +5 -11
  44. package/lib/Core/AnimationPlayer.js +2 -11
  45. package/lib/Core/Deprecated/Undeprecator.js +8 -19
  46. package/lib/Core/EntwinePointTileNode.js +6 -16
  47. package/lib/Core/Feature.js +16 -30
  48. package/lib/Core/Geographic/CoordStars.js +3 -12
  49. package/lib/Core/Geographic/Coordinates.js +12 -22
  50. package/lib/Core/Geographic/Crs.js +7 -15
  51. package/lib/Core/Geographic/Extent.js +36 -47
  52. package/lib/Core/Geographic/GeoidGrid.js +6 -16
  53. package/lib/Core/Label.js +7 -17
  54. package/lib/Core/MainLoop.js +7 -16
  55. package/lib/Core/Math/Ellipsoid.js +6 -17
  56. package/lib/Core/Picking.js +10 -20
  57. package/lib/Core/PointCloudNode.js +2 -11
  58. package/lib/Core/PotreeNode.js +4 -13
  59. package/lib/Core/Prefab/Globe/Atmosphere.js +17 -26
  60. package/lib/Core/Prefab/Globe/BuilderEllipsoidTile.js +6 -16
  61. package/lib/Core/Prefab/Globe/GlobeLayer.js +19 -28
  62. package/lib/Core/Prefab/Globe/SkyShader.js +2 -11
  63. package/lib/Core/Prefab/GlobeView.js +27 -37
  64. package/lib/Core/Prefab/Planar/PlanarLayer.js +11 -20
  65. package/lib/Core/Prefab/Planar/PlanarTileBuilder.js +6 -16
  66. package/lib/Core/Prefab/PlanarView.js +10 -20
  67. package/lib/Core/Prefab/TileBuilder.js +11 -20
  68. package/lib/Core/Prefab/computeBufferTileGeometry.js +11 -15
  69. package/lib/Core/Scheduler/Cache.js +2 -10
  70. package/lib/Core/Scheduler/CancelledCommandException.js +1 -8
  71. package/lib/Core/Scheduler/Scheduler.js +15 -23
  72. package/lib/Core/Style.js +26 -40
  73. package/lib/Core/System/Capabilities.js +2 -9
  74. package/lib/Core/TileGeometry.js +11 -14
  75. package/lib/Core/TileMesh.js +6 -15
  76. package/lib/Core/View.js +43 -53
  77. package/lib/Layer/C3DTilesLayer.js +29 -41
  78. package/lib/Layer/ColorLayer.js +10 -16
  79. package/lib/Layer/ElevationLayer.js +7 -14
  80. package/lib/Layer/EntwinePointTileLayer.js +11 -18
  81. package/lib/Layer/FeatureGeometryLayer.js +9 -16
  82. package/lib/Layer/GeoidLayer.js +6 -15
  83. package/lib/Layer/GeometryLayer.js +11 -17
  84. package/lib/Layer/InfoLayer.js +5 -14
  85. package/lib/Layer/LabelLayer.js +22 -32
  86. package/lib/Layer/Layer.js +16 -26
  87. package/lib/Layer/LayerUpdateState.js +1 -8
  88. package/lib/Layer/LayerUpdateStrategy.js +7 -18
  89. package/lib/Layer/OrientedImageLayer.js +15 -25
  90. package/lib/Layer/PointCloudLayer.js +27 -24
  91. package/lib/Layer/PotreeLayer.js +8 -18
  92. package/lib/Layer/RasterLayer.js +9 -17
  93. package/lib/Layer/ReferencingLayerProperties.js +1 -8
  94. package/lib/Layer/TiledGeometryLayer.js +37 -33
  95. package/lib/Main.js +86 -707
  96. package/lib/MainBundle.js +4 -34
  97. package/lib/Parser/B3dmParser.js +80 -131
  98. package/lib/Parser/CameraCalibrationParser.js +5 -14
  99. package/lib/Parser/GDFParser.js +11 -22
  100. package/lib/Parser/GLTFParser.js +88 -0
  101. package/lib/Parser/GTXParser.js +9 -21
  102. package/lib/Parser/GeoJsonParser.js +14 -22
  103. package/lib/Parser/GpxParser.js +7 -14
  104. package/lib/Parser/ISGParser.js +19 -28
  105. package/lib/Parser/KMLParser.js +7 -14
  106. package/lib/Parser/LASLoader.js +31 -21
  107. package/lib/Parser/LASParser.js +10 -17
  108. package/lib/Parser/MapBoxUrlParser.js +2 -9
  109. package/lib/Parser/PntsParser.js +4 -14
  110. package/lib/Parser/PotreeBinParser.js +8 -16
  111. package/lib/Parser/PotreeCinParser.js +3 -12
  112. package/lib/Parser/ShapefileParser.js +11 -18
  113. package/lib/Parser/VectorTileParser.js +23 -31
  114. package/lib/Parser/XbilParser.js +5 -13
  115. package/lib/Parser/deprecated/LegacyGLTFLoader.js +2 -12
  116. package/lib/Process/3dTilesProcessing.js +14 -27
  117. package/lib/Process/FeatureProcessing.js +14 -22
  118. package/lib/Process/LayeredMaterialNodeProcessing.js +19 -28
  119. package/lib/Process/ObjectRemovalHelper.js +2 -9
  120. package/lib/Process/handlerNodeError.js +1 -7
  121. package/lib/Provider/3dTilesProvider.js +32 -29
  122. package/lib/Provider/DataSourceProvider.js +2 -9
  123. package/lib/Provider/Fetcher.js +37 -13
  124. package/lib/Provider/PointCloudProvider.js +7 -19
  125. package/lib/Provider/TileProvider.js +4 -12
  126. package/lib/Provider/URLBuilder.js +4 -12
  127. package/lib/Renderer/Camera.js +7 -17
  128. package/lib/Renderer/Color.js +3 -11
  129. package/lib/Renderer/ColorLayersOrdering.js +14 -22
  130. package/lib/Renderer/CommonMaterial.js +3 -12
  131. package/lib/Renderer/Label2DRenderer.js +5 -16
  132. package/lib/Renderer/LayeredMaterial.js +27 -41
  133. package/lib/Renderer/OBB.js +12 -21
  134. package/lib/Renderer/OrientedImageCamera.js +2 -11
  135. package/lib/Renderer/OrientedImageMaterial.js +7 -17
  136. package/lib/Renderer/PointsMaterial.js +223 -84
  137. package/lib/Renderer/RasterTile.js +18 -30
  138. package/lib/Renderer/RenderMode.js +2 -9
  139. package/lib/Renderer/Shader/ShaderChunk.js +2 -11
  140. package/lib/Renderer/Shader/ShaderUtils.js +2 -9
  141. package/lib/Renderer/SphereHelper.js +2 -11
  142. package/lib/Renderer/WebXR.js +2 -11
  143. package/lib/Renderer/c3DEngine.js +18 -28
  144. package/lib/Source/C3DTilesGoogleSource.js +76 -0
  145. package/lib/Source/C3DTilesIonSource.js +6 -13
  146. package/lib/Source/C3DTilesSource.js +5 -12
  147. package/lib/Source/EntwinePointTileSource.js +12 -19
  148. package/lib/Source/FileSource.js +7 -14
  149. package/lib/Source/OrientedImageSource.js +6 -14
  150. package/lib/Source/PotreeSource.js +9 -16
  151. package/lib/Source/Source.js +26 -39
  152. package/lib/Source/TMSSource.js +11 -22
  153. package/lib/Source/VectorTilesSource.js +75 -34
  154. package/lib/Source/WFSSource.js +7 -14
  155. package/lib/Source/WMSSource.js +5 -12
  156. package/lib/Source/WMTSSource.js +3 -10
  157. package/lib/ThreeExtended/capabilities/WebGL.js +1 -8
  158. package/lib/ThreeExtended/libs/ktx-parse.module.js +2 -256
  159. package/lib/ThreeExtended/libs/zstddec.module.js +2 -8
  160. package/lib/ThreeExtended/loaders/DDSLoader.js +10 -16
  161. package/lib/ThreeExtended/loaders/DRACOLoader.js +14 -19
  162. package/lib/ThreeExtended/loaders/GLTFLoader.js +124 -129
  163. package/lib/ThreeExtended/loaders/KTX2Loader.js +73 -78
  164. package/lib/ThreeExtended/utils/BufferGeometryUtils.js +40 -59
  165. package/lib/ThreeExtended/utils/WorkerPool.js +2 -9
  166. package/lib/Utils/CameraUtils.js +32 -44
  167. package/lib/Utils/DEMUtils.js +8 -19
  168. package/lib/Utils/FeaturesUtils.js +8 -16
  169. package/lib/Utils/Gradients.js +16 -0
  170. package/lib/Utils/OrientationUtils.js +8 -18
  171. package/lib/Utils/ThreeUtils.js +2 -9
  172. package/lib/Utils/gui/C3DTilesStyle.js +7 -15
  173. package/lib/Utils/gui/Main.js +7 -48
  174. package/lib/Utils/gui/Minimap.js +12 -20
  175. package/lib/Utils/gui/Navigation.js +6 -14
  176. package/lib/Utils/gui/Scale.js +11 -19
  177. package/lib/Utils/gui/Searchbar.js +5 -13
  178. package/lib/Utils/gui/Widget.js +1 -8
  179. package/lib/Utils/placeObjectOnGround.js +13 -23
  180. package/package.json +13 -8
@@ -1,17 +1,8 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.default = void 0;
8
- var _Source = _interopRequireDefault(require("./Source"));
9
- var _URLBuilder = _interopRequireDefault(require("../Provider/URLBuilder"));
10
- var _Extent = _interopRequireWildcard(require("../Core/Geographic/Extent"));
11
- var _Crs = _interopRequireDefault(require("../Core/Geographic/Crs"));
12
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
13
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
14
- const extent = new _Extent.default(_Crs.default.tms_4326, 0, 0, 0);
1
+ import Source from "./Source.js";
2
+ import URLBuilder from "../Provider/URLBuilder.js";
3
+ import Extent, { globalExtentTMS } from "../Core/Geographic/Extent.js";
4
+ import CRS from "../Core/Geographic/Crs.js";
5
+ const extent = new Extent(CRS.tms_4326, 0, 0, 0);
15
6
 
16
7
  /**
17
8
  * @classdesc
@@ -78,7 +69,7 @@ const extent = new _Extent.default(_Crs.default.tms_4326, 0, 0, 0);
78
69
  * // Add the layer to the view
79
70
  * view.addLayer(imageryLayer);
80
71
  */
81
- class TMSSource extends _Source.default {
72
+ class TMSSource extends Source {
82
73
  /**
83
74
  * @param {Object} source - An object that can contain all properties of a
84
75
  * TMSSource and {@link Source}. Only `url` is mandatory.
@@ -94,12 +85,11 @@ class TMSSource extends _Source.default {
94
85
  this.isTMSSource = true;
95
86
  if (!source.extent) {
96
87
  // default to the global extent
97
- this.extent = _Extent.globalExtentTMS.get(source.crs);
88
+ this.extent = globalExtentTMS.get(source.crs);
98
89
  }
99
90
  this.zoom = source.zoom;
100
91
  this.isInverted = source.isInverted || false;
101
- this.url = source.url;
102
- this.crs = _Crs.default.formatToTms(source.crs);
92
+ this.crs = CRS.formatToTms(source.crs);
103
93
  this.tileMatrixSetLimits = source.tileMatrixSetLimits;
104
94
  this.extentSetlimits = {};
105
95
  this.tileMatrixCallback = source.tileMatrixCallback || (zoomLevel => zoomLevel);
@@ -121,7 +111,7 @@ class TMSSource extends _Source.default {
121
111
  }
122
112
  }
123
113
  urlFromExtent(extent) {
124
- return _URLBuilder.default.xyz(extent, this);
114
+ return URLBuilder.xyz(extent, this);
125
115
  }
126
116
  onLayerAdded(options) {
127
117
  super.onLayerAdded(options);
@@ -142,7 +132,7 @@ class TMSSource extends _Source.default {
142
132
  east,
143
133
  south
144
134
  } = extent.set(i, tmsl.maxTileRow, tmsl.maxTileCol).as(crs);
145
- this.extentSetlimits[crs][i] = new _Extent.default(crs, west, east, south, north);
135
+ this.extentSetlimits[crs][i] = new Extent(crs, west, east, south, north);
146
136
  }
147
137
  }
148
138
  }
@@ -153,5 +143,4 @@ class TMSSource extends _Source.default {
153
143
  return zoom >= this.zoom.min && zoom <= this.zoom.max && (this.extentSetlimits[extent.crs] == undefined || this.extentSetlimits[extent.crs][zoom].intersectsExtent(extent));
154
144
  }
155
145
  }
156
- var _default = TMSSource;
157
- exports.default = _default;
146
+ export default TMSSource;
@@ -1,18 +1,24 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.default = void 0;
8
- var _mapboxGlStyleSpec = require("@mapbox/mapbox-gl-style-spec");
9
- var _Style = _interopRequireDefault(require("../Core/Style"));
10
- var _TMSSource = _interopRequireDefault(require("./TMSSource"));
11
- var _Fetcher = _interopRequireDefault(require("../Provider/Fetcher"));
12
- var _MapBoxUrlParser = _interopRequireDefault(require("../Parser/MapBoxUrlParser"));
1
+ import { featureFilter } from '@mapbox/mapbox-gl-style-spec';
2
+ import Style from "../Core/Style.js";
3
+ import TMSSource from "./TMSSource.js";
4
+ import URLBuilder from "../Provider/URLBuilder.js";
5
+ import Fetcher from "../Provider/Fetcher.js";
6
+ import urlParser from "../Parser/MapBoxUrlParser.js";
13
7
  function toTMSUrl(url) {
14
8
  return url.replace(/\{/g, '${');
15
9
  }
10
+ function mergeCollections(collections) {
11
+ const collection = collections[0];
12
+ collections.forEach((col, index) => {
13
+ if (index === 0) {
14
+ return;
15
+ }
16
+ col.features.forEach(feature => {
17
+ collection.features.push(feature);
18
+ });
19
+ });
20
+ return collection;
21
+ }
16
22
 
17
23
  /**
18
24
  * @classdesc
@@ -24,7 +30,7 @@ function toTMSUrl(url) {
24
30
  * @property {boolean} [symbolToCircle=false] - If true, all symbols from a tile
25
31
  * will be considered as circle, and render as circles.
26
32
  */
27
- class VectorTilesSource extends _TMSSource.default {
33
+ class VectorTilesSource extends TMSSource {
28
34
  /**
29
35
  * @param {Object} source - An object that can contain all properties of a
30
36
  * VectorTilesSource and {@link Source}.
@@ -59,6 +65,7 @@ class VectorTilesSource extends _TMSSource.default {
59
65
  source.url = source.url || '.';
60
66
  super(source);
61
67
  const ffilter = source.filter || (() => true);
68
+ this.urls = [];
62
69
  this.layers = {};
63
70
  this.styles = {};
64
71
  let promise;
@@ -66,8 +73,8 @@ class VectorTilesSource extends _TMSSource.default {
66
73
  this.accessToken = source.accessToken;
67
74
  if (source.style) {
68
75
  if (typeof source.style == 'string') {
69
- const styleUrl = _MapBoxUrlParser.default.normalizeStyleURL(source.style, this.accessToken);
70
- promise = _Fetcher.default.json(styleUrl, this.networkOptions);
76
+ const styleUrl = urlParser.normalizeStyleURL(source.style, this.accessToken);
77
+ promise = Fetcher.json(styleUrl, this.networkOptions);
71
78
  } else {
72
79
  promise = Promise.resolve(source.style);
73
80
  }
@@ -78,24 +85,22 @@ class VectorTilesSource extends _TMSSource.default {
78
85
  this.jsonStyle = style;
79
86
  const baseurl = source.sprite || style.sprite;
80
87
  if (baseurl) {
81
- const spriteUrl = _MapBoxUrlParser.default.normalizeSpriteURL(baseurl, '', '.json', this.accessToken);
82
- return _Fetcher.default.json(spriteUrl, this.networkOptions).then(sprites => {
88
+ const spriteUrl = urlParser.normalizeSpriteURL(baseurl, '', '.json', this.accessToken);
89
+ return Fetcher.json(spriteUrl, this.networkOptions).then(sprites => {
83
90
  this.sprites = sprites;
84
- const imgUrl = _MapBoxUrlParser.default.normalizeSpriteURL(baseurl, '', '.png', this.accessToken);
91
+ const imgUrl = urlParser.normalizeSpriteURL(baseurl, '', '.png', this.accessToken);
85
92
  this.sprites.source = imgUrl;
86
93
  return style;
87
94
  });
88
95
  }
89
96
  return style;
90
97
  }).then(style => {
91
- const s = Object.keys(style.sources)[0];
92
- const os = style.sources[s];
93
98
  style.layers.forEach((layer, order) => {
94
99
  layer.sourceUid = this.uid;
95
100
  if (layer.type === 'background') {
96
101
  this.backgroundLayer = layer;
97
102
  } else if (ffilter(layer)) {
98
- const style = _Style.default.setFromVectorTileLayer(layer, this.sprites, order, this.symbolToCircle);
103
+ const style = Style.setFromVectorTileLayer(layer, this.sprites, order, this.symbolToCircle);
99
104
  this.styles[layer.id] = style;
100
105
  if (!this.layers[layer['source-layer']]) {
101
106
  this.layers[layer['source-layer']] = [];
@@ -103,7 +108,7 @@ class VectorTilesSource extends _TMSSource.default {
103
108
  this.layers[layer['source-layer']].push({
104
109
  id: layer.id,
105
110
  order,
106
- filterExpression: (0, _mapboxGlStyleSpec.featureFilter)(layer.filter),
111
+ filterExpression: featureFilter(layer.filter),
107
112
  zoom: {
108
113
  min: layer.minzoom || 0,
109
114
  max: layer.maxzoom || 24
@@ -112,17 +117,30 @@ class VectorTilesSource extends _TMSSource.default {
112
117
  }
113
118
  });
114
119
  if (this.url == '.') {
115
- if (os.url) {
116
- const urlSource = _MapBoxUrlParser.default.normalizeSourceURL(os.url, this.accessToken);
117
- return _Fetcher.default.json(urlSource, this.networkOptions).then(tileJSON => {
118
- if (tileJSON.tiles[0]) {
119
- this.url = toTMSUrl(tileJSON.tiles[0]);
120
- }
121
- });
122
- } else if (os.tiles[0]) {
123
- this.url = toTMSUrl(os.tiles[0]);
124
- }
120
+ const TMSUrlList = Object.values(style.sources).map(sourceVT => {
121
+ if (sourceVT.url) {
122
+ const urlSource = urlParser.normalizeSourceURL(sourceVT.url, this.accessToken);
123
+ return Fetcher.json(urlSource, this.networkOptions).then(tileJSON => {
124
+ if (tileJSON.tiles[0]) {
125
+ return toTMSUrl(tileJSON.tiles[0]);
126
+ }
127
+ });
128
+ } else if (sourceVT.tiles) {
129
+ return Promise.resolve(toTMSUrl(sourceVT.tiles[0]));
130
+ }
131
+ return Promise.reject();
132
+ });
133
+ return Promise.all(TMSUrlList);
125
134
  }
135
+ return Promise.resolve([this.url]);
136
+ }).then(TMSUrlList => {
137
+ this.urls = Array.from(new Set(TMSUrlList));
138
+ });
139
+ }
140
+ urlFromExtent(extent, url) {
141
+ return URLBuilder.xyz(extent, {
142
+ tileMatrixCallback: this.tileMatrixCallback,
143
+ url
126
144
  });
127
145
  }
128
146
  onLayerAdded(options) {
@@ -134,6 +152,29 @@ class VectorTilesSource extends _TMSSource.default {
134
152
  }
135
153
  }
136
154
  }
155
+ loadData(extent, out) {
156
+ const cache = this._featuresCaches[out.crs];
157
+ const key = this.requestToKey(extent);
158
+ // try to get parsed data from cache
159
+ let features = cache.getByArray(key);
160
+ if (!features) {
161
+ // otherwise fetch/parse the data
162
+ features = cache.setByArray(Promise.all(this.urls.map(url => this.fetcher(this.urlFromExtent(extent, url), this.networkOptions).then(file => this.parser(file, {
163
+ out,
164
+ in: this,
165
+ extent
166
+ })))).then(collections => mergeCollections(collections)).catch(err => this.handlingError(err)), key);
167
+
168
+ /* istanbul ignore next */
169
+ if (this.onParsedFile) {
170
+ features.then(feat => {
171
+ this.onParsedFile(feat);
172
+ console.warn('Source.onParsedFile was deprecated');
173
+ return feat;
174
+ });
175
+ }
176
+ }
177
+ return features;
178
+ }
137
179
  }
138
- var _default = VectorTilesSource;
139
- exports.default = _default;
180
+ export default VectorTilesSource;
@@ -1,13 +1,7 @@
1
- "use strict";
1
+ import Source from "./Source.js";
2
+ import URLBuilder from "../Provider/URLBuilder.js";
3
+ import CRS from "../Core/Geographic/Crs.js";
2
4
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.default = void 0;
8
- var _Source = _interopRequireDefault(require("./Source"));
9
- var _URLBuilder = _interopRequireDefault(require("../Provider/URLBuilder"));
10
- var _Crs = _interopRequireDefault(require("../Core/Geographic/Crs"));
11
5
  /**
12
6
  * @classdesc
13
7
  * An object defining the source of resources to get from a
@@ -102,7 +96,7 @@ var _Crs = _interopRequireDefault(require("../Core/Geographic/Crs"));
102
96
  * // Add the layer
103
97
  * view.addLayer(geometryLayer);
104
98
  */
105
- class WFSSource extends _Source.default {
99
+ class WFSSource extends Source {
106
100
  /**
107
101
  * @param {Object} source - An object that can contain all properties of a
108
102
  * WFSSource and {@link Source}. `url`, `typeName` and `crs` are
@@ -158,18 +152,17 @@ class WFSSource extends _Source.default {
158
152
  return super.handlingError(err);
159
153
  }
160
154
  requestToKey(extent) {
161
- if (_Crs.default.isTms(extent.crs)) {
155
+ if (CRS.isTms(extent.crs)) {
162
156
  return super.requestToKey(extent);
163
157
  } else {
164
158
  return [extent.zoom, extent.south, extent.west];
165
159
  }
166
160
  }
167
161
  urlFromExtent(extent) {
168
- return _URLBuilder.default.bbox(extent, this);
162
+ return URLBuilder.bbox(extent, this);
169
163
  }
170
164
  extentInsideLimit(extent) {
171
165
  return this.extent.intersectsExtent(extent);
172
166
  }
173
167
  }
174
- var _default = WFSSource;
175
- exports.default = _default;
168
+ export default WFSSource;
@@ -1,12 +1,6 @@
1
- "use strict";
1
+ import Source from "./Source.js";
2
+ import URLBuilder from "../Provider/URLBuilder.js";
2
3
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.default = void 0;
8
- var _Source = _interopRequireDefault(require("./Source"));
9
- var _URLBuilder = _interopRequireDefault(require("../Provider/URLBuilder"));
10
4
  /**
11
5
  * @classdesc
12
6
  * An object defining the source of images to get from a
@@ -72,7 +66,7 @@ var _URLBuilder = _interopRequireDefault(require("../Provider/URLBuilder"));
72
66
  * // Add the layer
73
67
  * view.addLayer(colorlayer);
74
68
  */
75
- class WMSSource extends _Source.default {
69
+ class WMSSource extends Source {
76
70
  /**
77
71
  * @param {Object} source - An object that can contain all properties of
78
72
  * WMSSource and {@link Source}. `url`, `name`, `extent` and `crs`
@@ -130,11 +124,10 @@ class WMSSource extends _Source.default {
130
124
  }
131
125
  }
132
126
  urlFromExtent(extent) {
133
- return _URLBuilder.default.bbox(extent, this);
127
+ return URLBuilder.bbox(extent, this);
134
128
  }
135
129
  extentInsideLimit(extent) {
136
130
  return this.extent.intersectsExtent(extent);
137
131
  }
138
132
  }
139
- var _default = WMSSource;
140
- exports.default = _default;
133
+ export default WMSSource;
@@ -1,11 +1,5 @@
1
- "use strict";
1
+ import TMSSource from "./TMSSource.js";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.default = void 0;
8
- var _TMSSource = _interopRequireDefault(require("./TMSSource"));
9
3
  /**
10
4
  * @classdesc
11
5
  * An object defining the source of resources to get from a
@@ -65,7 +59,7 @@ var _TMSSource = _interopRequireDefault(require("./TMSSource"));
65
59
  * // Add the layer
66
60
  * view.addLayer(colorLayer);
67
61
  */
68
- class WMTSSource extends _TMSSource.default {
62
+ class WMTSSource extends TMSSource {
69
63
  /**
70
64
  * @param {Object} source - An object that can contain all properties of a
71
65
  * WMTSSource and {@link Source}. Only `url`, `name` and `crs` are mandatory.
@@ -92,5 +86,4 @@ class WMTSSource extends _TMSSource.default {
92
86
  }
93
87
  }
94
88
  }
95
- var _default = WMTSSource;
96
- exports.default = _default;
89
+ export default WMTSSource;
@@ -1,9 +1,3 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
1
  class WebGL {
8
2
  static isWebGLAvailable() {
9
3
  try {
@@ -67,5 +61,4 @@ class WebGL {
67
61
  return element;
68
62
  }
69
63
  }
70
- var _default = WebGL;
71
- exports.default = _default;
64
+ export default WebGL;