itowns 2.42.1-next.2 → 2.42.1-next.21
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/debug.js +1 -1
- package/dist/debug.js.map +1 -1
- package/dist/itowns.js +1 -1
- package/dist/itowns.js.map +1 -1
- package/dist/itowns_widgets.js +1 -1
- package/dist/itowns_widgets.js.map +1 -1
- package/examples/{.eslintrc.js → .eslintrc.cjs} +1 -1
- package/examples/effects_stereo.html +2 -2
- package/examples/entwine_simple_loader.html +24 -8
- package/examples/misc_collada.html +2 -2
- package/examples/misc_instancing.html +1 -1
- package/examples/source_file_gpx_3d.html +2 -2
- package/examples/source_stream_wfs_25d.html +11 -11
- package/examples/source_stream_wfs_3d.html +1 -1
- package/examples/vector_tile_3d_mesh.html +2 -2
- package/examples/vector_tile_raster_2d.html +1 -1
- package/examples/vector_tile_raster_3d.html +1 -1
- package/examples/view_25d_map.html +2 -2
- package/examples/view_3d_map.html +3 -3
- package/examples/view_3d_map_webxr.html +1 -1
- package/examples/view_3d_mns_map.html +3 -3
- package/examples/view_immersive.html +1 -1
- package/examples/view_multi_25d.html +2 -2
- package/examples/widgets_minimap.html +1 -1
- package/examples/widgets_searchbar.html +2 -2
- package/lib/Controls/FirstPersonControls.js +5 -12
- package/lib/Controls/FlyControls.js +4 -13
- package/lib/Controls/GlobeControls.js +33 -43
- package/lib/Controls/PlanarControls.js +9 -20
- package/lib/Controls/StateControl.js +2 -11
- package/lib/Controls/StreetControls.js +14 -24
- package/lib/Converter/Feature2Mesh.js +77 -70
- package/lib/Converter/Feature2Texture.js +15 -25
- package/lib/Converter/convertToTile.js +16 -26
- package/lib/Converter/textureConverter.js +9 -19
- package/lib/Core/3DTiles/C3DTBatchTable.js +5 -13
- package/lib/Core/3DTiles/C3DTBatchTableHierarchyExtension.js +1 -8
- package/lib/Core/3DTiles/C3DTBoundingVolume.js +17 -27
- package/lib/Core/3DTiles/C3DTExtensions.js +1 -8
- package/lib/Core/3DTiles/C3DTFeature.js +3 -10
- package/lib/Core/3DTiles/C3DTilesEnums.js +3 -11
- package/lib/Core/3DTiles/C3DTileset.js +7 -16
- package/lib/Core/3DTiles/utils/BinaryPropertyAccessor.js +5 -11
- package/lib/Core/AnimationPlayer.js +2 -11
- package/lib/Core/Deprecated/Undeprecator.js +9 -20
- package/lib/Core/EntwinePointTileNode.js +6 -16
- package/lib/Core/Feature.js +16 -30
- package/lib/Core/Geographic/CoordStars.js +3 -12
- package/lib/Core/Geographic/Coordinates.js +12 -22
- package/lib/Core/Geographic/Crs.js +7 -15
- package/lib/Core/Geographic/Extent.js +36 -47
- package/lib/Core/Geographic/GeoidGrid.js +6 -16
- package/lib/Core/Label.js +7 -17
- package/lib/Core/MainLoop.js +7 -16
- package/lib/Core/Math/Ellipsoid.js +6 -17
- package/lib/Core/Picking.js +10 -20
- package/lib/Core/PointCloudNode.js +2 -11
- package/lib/Core/PotreeNode.js +4 -13
- package/lib/Core/Prefab/Globe/Atmosphere.js +17 -26
- package/lib/Core/Prefab/Globe/BuilderEllipsoidTile.js +6 -16
- package/lib/Core/Prefab/Globe/GlobeLayer.js +19 -28
- package/lib/Core/Prefab/Globe/SkyShader.js +2 -11
- package/lib/Core/Prefab/GlobeView.js +27 -45
- package/lib/Core/Prefab/Planar/PlanarLayer.js +11 -20
- package/lib/Core/Prefab/Planar/PlanarTileBuilder.js +6 -16
- package/lib/Core/Prefab/PlanarView.js +10 -25
- package/lib/Core/Prefab/TileBuilder.js +13 -22
- package/lib/Core/Prefab/computeBufferTileGeometry.js +12 -16
- package/lib/Core/Scheduler/Cache.js +2 -10
- package/lib/Core/Scheduler/CancelledCommandException.js +1 -8
- package/lib/Core/Scheduler/Scheduler.js +15 -23
- package/lib/Core/Style.js +26 -40
- package/lib/Core/System/Capabilities.js +2 -13
- package/lib/Core/TileGeometry.js +13 -15
- package/lib/Core/TileMesh.js +6 -15
- package/lib/Core/View.js +43 -58
- package/lib/Layer/C3DTilesLayer.js +29 -41
- package/lib/Layer/ColorLayer.js +10 -16
- package/lib/Layer/ElevationLayer.js +7 -14
- package/lib/Layer/EntwinePointTileLayer.js +11 -18
- package/lib/Layer/FeatureGeometryLayer.js +9 -16
- package/lib/Layer/GeoidLayer.js +6 -15
- package/lib/Layer/GeometryLayer.js +11 -17
- package/lib/Layer/InfoLayer.js +5 -14
- package/lib/Layer/LabelLayer.js +22 -32
- package/lib/Layer/Layer.js +16 -26
- package/lib/Layer/LayerUpdateState.js +1 -8
- package/lib/Layer/LayerUpdateStrategy.js +7 -18
- package/lib/Layer/OrientedImageLayer.js +15 -25
- package/lib/Layer/PointCloudLayer.js +27 -24
- package/lib/Layer/PotreeLayer.js +8 -18
- package/lib/Layer/RasterLayer.js +9 -17
- package/lib/Layer/ReferencingLayerProperties.js +1 -8
- package/lib/Layer/TiledGeometryLayer.js +37 -33
- package/lib/Main.js +86 -707
- package/lib/MainBundle.js +4 -34
- package/lib/Parser/B3dmParser.js +80 -131
- package/lib/Parser/CameraCalibrationParser.js +5 -14
- package/lib/Parser/GDFParser.js +11 -22
- package/lib/Parser/GLTFParser.js +88 -0
- package/lib/Parser/GTXParser.js +9 -21
- package/lib/Parser/GeoJsonParser.js +14 -22
- package/lib/Parser/GpxParser.js +7 -14
- package/lib/Parser/ISGParser.js +19 -28
- package/lib/Parser/KMLParser.js +7 -14
- package/lib/Parser/LASLoader.js +31 -21
- package/lib/Parser/LASParser.js +10 -17
- package/lib/Parser/MapBoxUrlParser.js +2 -9
- package/lib/Parser/PntsParser.js +4 -14
- package/lib/Parser/PotreeBinParser.js +8 -16
- package/lib/Parser/PotreeCinParser.js +3 -12
- package/lib/Parser/ShapefileParser.js +11 -18
- package/lib/Parser/VectorTileParser.js +23 -31
- package/lib/Parser/XbilParser.js +5 -13
- package/lib/Parser/deprecated/LegacyGLTFLoader.js +2 -12
- package/lib/Process/3dTilesProcessing.js +14 -27
- package/lib/Process/FeatureProcessing.js +14 -22
- package/lib/Process/LayeredMaterialNodeProcessing.js +19 -28
- package/lib/Process/ObjectRemovalHelper.js +2 -9
- package/lib/Process/handlerNodeError.js +1 -7
- package/lib/Provider/3dTilesProvider.js +32 -29
- package/lib/Provider/DataSourceProvider.js +2 -9
- package/lib/Provider/Fetcher.js +40 -22
- package/lib/Provider/PointCloudProvider.js +7 -19
- package/lib/Provider/TileProvider.js +4 -12
- package/lib/Provider/URLBuilder.js +4 -12
- package/lib/Renderer/Camera.js +7 -17
- package/lib/Renderer/Color.js +3 -11
- package/lib/Renderer/ColorLayersOrdering.js +14 -22
- package/lib/Renderer/CommonMaterial.js +3 -12
- package/lib/Renderer/Label2DRenderer.js +5 -16
- package/lib/Renderer/LayeredMaterial.js +33 -53
- package/lib/Renderer/OBB.js +12 -21
- package/lib/Renderer/OrientedImageCamera.js +2 -11
- package/lib/Renderer/OrientedImageMaterial.js +17 -35
- package/lib/Renderer/PointsMaterial.js +224 -94
- package/lib/Renderer/RasterTile.js +18 -30
- package/lib/Renderer/RenderMode.js +2 -9
- package/lib/Renderer/Shader/ShaderChunk.js +5 -23
- package/lib/Renderer/Shader/ShaderUtils.js +2 -9
- package/lib/Renderer/SphereHelper.js +2 -11
- package/lib/Renderer/WebXR.js +2 -11
- package/lib/Renderer/c3DEngine.js +20 -53
- package/lib/Source/C3DTilesGoogleSource.js +76 -0
- package/lib/Source/C3DTilesIonSource.js +6 -13
- package/lib/Source/C3DTilesSource.js +5 -12
- package/lib/Source/EntwinePointTileSource.js +12 -19
- package/lib/Source/FileSource.js +7 -14
- package/lib/Source/OrientedImageSource.js +6 -14
- package/lib/Source/PotreeSource.js +9 -16
- package/lib/Source/Source.js +26 -39
- package/lib/Source/TMSSource.js +11 -22
- package/lib/Source/VectorTilesSource.js +75 -34
- package/lib/Source/WFSSource.js +7 -14
- package/lib/Source/WMSSource.js +5 -12
- package/lib/Source/WMTSSource.js +3 -10
- package/lib/ThreeExtended/capabilities/WebGL.js +1 -8
- package/lib/ThreeExtended/libs/ktx-parse.module.js +2 -256
- package/lib/ThreeExtended/libs/zstddec.module.js +2 -8
- package/lib/ThreeExtended/loaders/DDSLoader.js +10 -16
- package/lib/ThreeExtended/loaders/DRACOLoader.js +14 -19
- package/lib/ThreeExtended/loaders/GLTFLoader.js +124 -129
- package/lib/ThreeExtended/loaders/KTX2Loader.js +73 -78
- package/lib/ThreeExtended/utils/BufferGeometryUtils.js +40 -59
- package/lib/ThreeExtended/utils/WorkerPool.js +2 -9
- package/lib/Utils/CameraUtils.js +32 -44
- package/lib/Utils/DEMUtils.js +8 -19
- package/lib/Utils/FeaturesUtils.js +8 -16
- package/lib/Utils/Gradients.js +16 -0
- package/lib/Utils/OrientationUtils.js +8 -18
- package/lib/Utils/ThreeUtils.js +2 -9
- package/lib/Utils/gui/C3DTilesStyle.js +7 -15
- package/lib/Utils/gui/Main.js +7 -48
- package/lib/Utils/gui/Minimap.js +12 -20
- package/lib/Utils/gui/Navigation.js +6 -14
- package/lib/Utils/gui/Scale.js +11 -19
- package/lib/Utils/gui/Searchbar.js +5 -13
- package/lib/Utils/gui/Widget.js +1 -8
- package/lib/Utils/placeObjectOnGround.js +13 -23
- package/package.json +13 -8
package/lib/Source/FileSource.js
CHANGED
|
@@ -1,13 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import Source from "./Source.js";
|
|
2
|
+
import Cache from "../Core/Scheduler/Cache.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 _Cache = _interopRequireDefault(require("../Core/Scheduler/Cache"));
|
|
10
|
-
var _Crs = _interopRequireDefault(require("../Core/Geographic/Crs"));
|
|
11
5
|
/**
|
|
12
6
|
* @classdesc
|
|
13
7
|
* An object defining the source of a single resource to get from a direct
|
|
@@ -104,7 +98,7 @@ var _Crs = _interopRequireDefault(require("../Core/Geographic/Crs"));
|
|
|
104
98
|
* return view.addLayer(ariegeLayer);
|
|
105
99
|
* });
|
|
106
100
|
*/
|
|
107
|
-
class FileSource extends
|
|
101
|
+
class FileSource extends Source {
|
|
108
102
|
/**
|
|
109
103
|
* @param {Object} source - An object that can contain all properties of a
|
|
110
104
|
* FileSource and {@link Source}. Only `crs` is mandatory, but if it
|
|
@@ -145,7 +139,7 @@ class FileSource extends _Source.default {
|
|
|
145
139
|
this.fetchedData = f;
|
|
146
140
|
});
|
|
147
141
|
} else if (source.features) {
|
|
148
|
-
this._featuresCaches[source.features.crs] = new
|
|
142
|
+
this._featuresCaches[source.features.crs] = new Cache();
|
|
149
143
|
this._featuresCaches[source.features.crs].setByArray(Promise.resolve(source.features), [0]);
|
|
150
144
|
}
|
|
151
145
|
this.whenReady.then(() => this.fetchedData);
|
|
@@ -164,7 +158,7 @@ class FileSource extends _Source.default {
|
|
|
164
158
|
if (!features) {
|
|
165
159
|
options.out.buildExtent = this.crs != 'EPSG:4978';
|
|
166
160
|
if (options.out.buildExtent) {
|
|
167
|
-
options.out.forcedExtentCrs = options.out.crs != 'EPSG:4978' ? options.out.crs :
|
|
161
|
+
options.out.forcedExtentCrs = options.out.crs != 'EPSG:4978' ? options.out.crs : CRS.formatToEPSG(this.crs);
|
|
168
162
|
}
|
|
169
163
|
features = this.parser(this.fetchedData, options);
|
|
170
164
|
this._featuresCaches[options.out.crs].setByArray(features, [0]);
|
|
@@ -195,5 +189,4 @@ class FileSource extends _Source.default {
|
|
|
195
189
|
return this.extent.intersectsExtent(extent);
|
|
196
190
|
}
|
|
197
191
|
}
|
|
198
|
-
|
|
199
|
-
exports.default = _default;
|
|
192
|
+
export default FileSource;
|
|
@@ -1,17 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
import Source from "./Source.js";
|
|
2
|
+
import Fetcher from "../Provider/Fetcher.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 _Fetcher = _interopRequireDefault(require("../Provider/Fetcher"));
|
|
10
4
|
/**
|
|
11
5
|
* @classdesc OrientedImageSource is a specific source used to load oriented images.
|
|
12
6
|
* @extends Source
|
|
13
7
|
*/
|
|
14
|
-
class OrientedImageSource extends
|
|
8
|
+
class OrientedImageSource extends Source {
|
|
15
9
|
/**
|
|
16
10
|
* @constructor
|
|
17
11
|
* @param { Object } source - Configuration object
|
|
@@ -23,14 +17,13 @@ class OrientedImageSource extends _Source.default {
|
|
|
23
17
|
* to find the good texture for each camera for each panoramic.
|
|
24
18
|
*/
|
|
25
19
|
constructor(source) {
|
|
26
|
-
source.format = source.format || 'json';
|
|
27
20
|
super(source);
|
|
28
21
|
this.isOrientedImageSource = true;
|
|
29
22
|
|
|
30
23
|
// Fetch the two files
|
|
31
24
|
const promises = [];
|
|
32
|
-
promises.push(source.orientationsUrl ?
|
|
33
|
-
promises.push(source.calibrationUrl ?
|
|
25
|
+
promises.push(source.orientationsUrl ? Fetcher.json(source.orientationsUrl, this.networkOptions) : Promise.resolve());
|
|
26
|
+
promises.push(source.calibrationUrl ? Fetcher.json(source.calibrationUrl, this.networkOptions) : Promise.resolve());
|
|
34
27
|
this.whenReady = Promise.all(promises).then(data => ({
|
|
35
28
|
orientation: data[0],
|
|
36
29
|
calibration: data[1]
|
|
@@ -63,5 +56,4 @@ class OrientedImageSource extends _Source.default {
|
|
|
63
56
|
return this.url.replace('{cameraId}', cameraId).replace('{panoId}', panoId);
|
|
64
57
|
}
|
|
65
58
|
}
|
|
66
|
-
|
|
67
|
-
exports.default = _default;
|
|
59
|
+
export default OrientedImageSource;
|
|
@@ -1,14 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import Source from "./Source.js";
|
|
2
|
+
import Fetcher from "../Provider/Fetcher.js";
|
|
3
|
+
import PotreeBinParser from "../Parser/PotreeBinParser.js";
|
|
4
|
+
import PotreeCinParser from "../Parser/PotreeCinParser.js";
|
|
2
5
|
|
|
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 _Fetcher = _interopRequireDefault(require("../Provider/Fetcher"));
|
|
10
|
-
var _PotreeBinParser = _interopRequireDefault(require("../Parser/PotreeBinParser"));
|
|
11
|
-
var _PotreeCinParser = _interopRequireDefault(require("../Parser/PotreeCinParser"));
|
|
12
6
|
/**
|
|
13
7
|
* @classdesc
|
|
14
8
|
* PotreeSource are object containing informations on how to fetch points cloud resources.
|
|
@@ -16,7 +10,7 @@ var _PotreeCinParser = _interopRequireDefault(require("../Parser/PotreeCinParser
|
|
|
16
10
|
*
|
|
17
11
|
*/
|
|
18
12
|
|
|
19
|
-
class PotreeSource extends
|
|
13
|
+
class PotreeSource extends Source {
|
|
20
14
|
/**
|
|
21
15
|
* @param {Object} source - An object that can contain all properties of a
|
|
22
16
|
* PotreeSource
|
|
@@ -76,19 +70,18 @@ class PotreeSource extends _Source.default {
|
|
|
76
70
|
}
|
|
77
71
|
super(source);
|
|
78
72
|
this.file = source.file;
|
|
79
|
-
this.fetcher =
|
|
73
|
+
this.fetcher = Fetcher.arrayBuffer;
|
|
80
74
|
this.extensionOctree = 'hrc';
|
|
81
75
|
|
|
82
76
|
// For cloud specification visit:
|
|
83
77
|
// https://github.com/PropellerAero/potree-propeller-private/blob/master/docs/file_format.md#cloudjs
|
|
84
|
-
this.whenReady = (source.cloud ? Promise.resolve(source.cloud) :
|
|
78
|
+
this.whenReady = (source.cloud ? Promise.resolve(source.cloud) : Fetcher.json(`${this.url}/${this.file}`, this.networkOptions)).then(cloud => {
|
|
85
79
|
this.pointAttributes = cloud.pointAttributes;
|
|
86
80
|
this.baseurl = `${this.url}/${cloud.octreeDir}/r`;
|
|
87
81
|
this.extension = cloud.pointAttributes === 'CIN' ? 'cin' : 'bin';
|
|
88
|
-
this.parse = this.extension === 'cin' ?
|
|
82
|
+
this.parse = this.extension === 'cin' ? PotreeCinParser.parse : PotreeBinParser.parse;
|
|
89
83
|
return cloud;
|
|
90
84
|
});
|
|
91
85
|
}
|
|
92
86
|
}
|
|
93
|
-
|
|
94
|
-
exports.default = _default;
|
|
87
|
+
export default PotreeSource;
|
package/lib/Source/Source.js
CHANGED
|
@@ -1,25 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
var _GTXParser = _interopRequireDefault(require("../Parser/GTXParser"));
|
|
14
|
-
var _ISGParser = _interopRequireDefault(require("../Parser/ISGParser"));
|
|
15
|
-
var _VectorTileParser = _interopRequireDefault(require("../Parser/VectorTileParser"));
|
|
16
|
-
var _Fetcher = _interopRequireDefault(require("../Provider/Fetcher"));
|
|
17
|
-
var _Cache = _interopRequireDefault(require("../Core/Scheduler/Cache"));
|
|
18
|
-
var _Crs = _interopRequireDefault(require("../Core/Geographic/Crs"));
|
|
19
|
-
const supportedFetchers = new Map([['image/x-bil;bits=32', _Fetcher.default.textureFloat], ['geojson', _Fetcher.default.json], ['application/json', _Fetcher.default.json], ['application/kml', _Fetcher.default.xml], ['application/gpx', _Fetcher.default.xml], ['application/x-protobuf;type=mapbox-vector', _Fetcher.default.arrayBuffer], ['application/gtx', _Fetcher.default.arrayBuffer], ['application/isg', _Fetcher.default.text], ['application/gdf', _Fetcher.default.text]]);
|
|
20
|
-
exports.supportedFetchers = supportedFetchers;
|
|
21
|
-
const supportedParsers = new Map([['geojson', _GeoJsonParser.default.parse], ['application/json', _GeoJsonParser.default.parse], ['application/kml', _KMLParser.default.parse], ['application/gpx', _GpxParser.default.parse], ['application/x-protobuf;type=mapbox-vector', _VectorTileParser.default.parse], ['application/gtx', _GTXParser.default.parse], ['application/isg', _ISGParser.default.parse], ['application/gdf', _GDFParser.default.parse]]);
|
|
22
|
-
exports.supportedParsers = supportedParsers;
|
|
1
|
+
import Extent from "../Core/Geographic/Extent.js";
|
|
2
|
+
import GeoJsonParser from "../Parser/GeoJsonParser.js";
|
|
3
|
+
import KMLParser from "../Parser/KMLParser.js";
|
|
4
|
+
import GDFParser from "../Parser/GDFParser.js";
|
|
5
|
+
import GpxParser from "../Parser/GpxParser.js";
|
|
6
|
+
import GTXParser from "../Parser/GTXParser.js";
|
|
7
|
+
import ISGParser from "../Parser/ISGParser.js";
|
|
8
|
+
import VectorTileParser from "../Parser/VectorTileParser.js";
|
|
9
|
+
import Fetcher from "../Provider/Fetcher.js";
|
|
10
|
+
import Cache from "../Core/Scheduler/Cache.js";
|
|
11
|
+
import CRS from "../Core/Geographic/Crs.js";
|
|
12
|
+
export const supportedParsers = new Map([['application/geo+json', GeoJsonParser.parse], ['application/json', GeoJsonParser.parse], ['application/kml', KMLParser.parse], ['application/gpx', GpxParser.parse], ['application/x-protobuf;type=mapbox-vector', VectorTileParser.parse], ['application/gtx', GTXParser.parse], ['application/isg', ISGParser.parse], ['application/gdf', GDFParser.parse]]);
|
|
23
13
|
const noCache = {
|
|
24
14
|
getByArray: () => {},
|
|
25
15
|
setByArray: a => a,
|
|
@@ -44,7 +34,7 @@ class InformationsData {
|
|
|
44
34
|
options.crs = options.crs || options.projection;
|
|
45
35
|
}
|
|
46
36
|
if (options.crs) {
|
|
47
|
-
|
|
37
|
+
CRS.isValid(options.crs);
|
|
48
38
|
}
|
|
49
39
|
this.crs = options.crs;
|
|
50
40
|
}
|
|
@@ -56,13 +46,6 @@ class InformationsData {
|
|
|
56
46
|
*/
|
|
57
47
|
// eslint-disable-next-line
|
|
58
48
|
class /* istanbul ignore next */ParsingOptions {}
|
|
59
|
-
function fetchSourceData(source, extent) {
|
|
60
|
-
const url = source.urlFromExtent(extent);
|
|
61
|
-
return source.fetcher(url, source.networkOptions).then(f => {
|
|
62
|
-
f.extent = extent;
|
|
63
|
-
return f;
|
|
64
|
-
}, err => source.handlingError(err));
|
|
65
|
-
}
|
|
66
49
|
let uid = 0;
|
|
67
50
|
|
|
68
51
|
/**
|
|
@@ -125,8 +108,11 @@ class Source extends InformationsData {
|
|
|
125
108
|
this.uid = uid++;
|
|
126
109
|
this.url = source.url;
|
|
127
110
|
this.format = source.format;
|
|
128
|
-
this.fetcher = source.fetcher ||
|
|
129
|
-
this.parser = source.parser || supportedParsers.get(source.format) || (d =>
|
|
111
|
+
this.fetcher = source.fetcher || Fetcher.get(source.format);
|
|
112
|
+
this.parser = source.parser || supportedParsers.get(source.format) || ((d, opt) => {
|
|
113
|
+
d.extent = opt.extent;
|
|
114
|
+
return d;
|
|
115
|
+
});
|
|
130
116
|
this.isVectorSource = (source.parser || supportedParsers.get(source.format)) != undefined;
|
|
131
117
|
this.networkOptions = source.networkOptions || {
|
|
132
118
|
crossOrigin: 'anonymous'
|
|
@@ -135,7 +121,7 @@ class Source extends InformationsData {
|
|
|
135
121
|
this.whenReady = Promise.resolve();
|
|
136
122
|
this._featuresCaches = {};
|
|
137
123
|
if (source.extent && !source.extent.isExtent) {
|
|
138
|
-
this.extent = new
|
|
124
|
+
this.extent = new Extent(this.crs, source.extent);
|
|
139
125
|
} else {
|
|
140
126
|
this.extent = source.extent;
|
|
141
127
|
}
|
|
@@ -174,10 +160,12 @@ class Source extends InformationsData {
|
|
|
174
160
|
let features = cache.getByArray(key);
|
|
175
161
|
if (!features) {
|
|
176
162
|
// otherwise fetch/parse the data
|
|
177
|
-
features = cache.setByArray(
|
|
163
|
+
features = cache.setByArray(this.fetcher(this.urlFromExtent(extent), this.networkOptions).then(file => this.parser(file, {
|
|
178
164
|
out,
|
|
179
|
-
in: this
|
|
180
|
-
|
|
165
|
+
in: this,
|
|
166
|
+
extent
|
|
167
|
+
})).catch(err => this.handlingError(err)), key);
|
|
168
|
+
|
|
181
169
|
/* istanbul ignore next */
|
|
182
170
|
if (this.onParsedFile) {
|
|
183
171
|
features.then(feat => {
|
|
@@ -201,7 +189,7 @@ class Source extends InformationsData {
|
|
|
201
189
|
// Cache feature only if it's vector data, the feature are cached in source.
|
|
202
190
|
// It's not necessary to cache raster in Source,
|
|
203
191
|
// because it's already cached on layer.
|
|
204
|
-
this._featuresCaches[options.out.crs] = this.isVectorSource ? new
|
|
192
|
+
this._featuresCaches[options.out.crs] = this.isVectorSource ? new Cache() : noCache;
|
|
205
193
|
}
|
|
206
194
|
}
|
|
207
195
|
|
|
@@ -231,5 +219,4 @@ class Source extends InformationsData {
|
|
|
231
219
|
throw new Error('In extented Source, you have to implement the method extentInsideLimit!');
|
|
232
220
|
}
|
|
233
221
|
}
|
|
234
|
-
|
|
235
|
-
exports.default = _default;
|
|
222
|
+
export default Source;
|
package/lib/Source/TMSSource.js
CHANGED
|
@@ -1,17 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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
|
|
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 =
|
|
88
|
+
this.extent = globalExtentTMS.get(source.crs);
|
|
98
89
|
}
|
|
99
90
|
this.zoom = source.zoom;
|
|
100
91
|
this.isInverted = source.isInverted || false;
|
|
101
|
-
this.
|
|
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
|
|
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
|
|
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
|
-
|
|
157
|
-
exports.default = _default;
|
|
146
|
+
export default TMSSource;
|
|
@@ -1,18 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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
|
|
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 =
|
|
70
|
-
promise =
|
|
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 =
|
|
82
|
-
return
|
|
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 =
|
|
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 =
|
|
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:
|
|
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
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
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
|
-
|
|
139
|
-
exports.default = _default;
|
|
180
|
+
export default VectorTilesSource;
|
package/lib/Source/WFSSource.js
CHANGED
|
@@ -1,13 +1,7 @@
|
|
|
1
|
-
|
|
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
|
|
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 (
|
|
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
|
|
162
|
+
return URLBuilder.bbox(extent, this);
|
|
169
163
|
}
|
|
170
164
|
extentInsideLimit(extent) {
|
|
171
165
|
return this.extent.intersectsExtent(extent);
|
|
172
166
|
}
|
|
173
167
|
}
|
|
174
|
-
|
|
175
|
-
exports.default = _default;
|
|
168
|
+
export default WFSSource;
|
package/lib/Source/WMSSource.js
CHANGED
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
|
|
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
|
|
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
|
|
127
|
+
return URLBuilder.bbox(extent, this);
|
|
134
128
|
}
|
|
135
129
|
extentInsideLimit(extent) {
|
|
136
130
|
return this.extent.intersectsExtent(extent);
|
|
137
131
|
}
|
|
138
132
|
}
|
|
139
|
-
|
|
140
|
-
exports.default = _default;
|
|
133
|
+
export default WMSSource;
|
package/lib/Source/WMTSSource.js
CHANGED
|
@@ -1,11 +1,5 @@
|
|
|
1
|
-
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
71
|
-
exports.default = _default;
|
|
64
|
+
export default WebGL;
|