@gisatcz/deckgl-geolib 2.6.1-dev.1 → 2.7.0-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +13 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/index.min.js +2 -2
- package/dist/cjs/index.min.js.map +1 -1
- package/dist/esm/index.js +13 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index.min.js +2 -2
- package/dist/esm/index.min.js.map +1 -1
- package/dist/esm/types/layers/CogBitmapLayer.d.ts +6 -0
- package/dist/esm/types/layers/CogTerrainLayer.d.ts +5 -0
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -8202,7 +8202,7 @@ class CogBitmapLayer extends CompositeLayer {
|
|
|
8202
8202
|
});
|
|
8203
8203
|
}
|
|
8204
8204
|
renderLayers() {
|
|
8205
|
-
const { clampToTerrain, maxRequests, onTileLoad, onTileUnload, onTileError, maxCacheSize, maxCacheByteSize, refinementStrategy, cogBitmapOptions, } = this.props;
|
|
8205
|
+
const { clampToTerrain, maxRequests, onTileLoad, onTileUnload, onTileError, maxCacheSize, maxCacheByteSize, refinementStrategy, cogBitmapOptions, zRange, } = this.props;
|
|
8206
8206
|
if (this.state.isTiled && this.state.initialized) {
|
|
8207
8207
|
const { tileSize } = this.state.bitmapCogTiles;
|
|
8208
8208
|
return new TileLayer(this.getSubLayerProps({
|
|
@@ -8212,6 +8212,7 @@ class CogBitmapLayer extends CompositeLayer {
|
|
|
8212
8212
|
renderSubLayers: this.renderSubLayers.bind(this),
|
|
8213
8213
|
pickable: this.props.pickable,
|
|
8214
8214
|
onClick: this.props.onClick,
|
|
8215
|
+
zRange,
|
|
8215
8216
|
updateTriggers: {
|
|
8216
8217
|
getTileData: [
|
|
8217
8218
|
// rasterData: urlTemplateToUpdateTrigger(rasterData),
|
|
@@ -8306,6 +8307,7 @@ const defaultProps = {
|
|
|
8306
8307
|
// Enable progressive loading by default (overview tiles first, then detail)
|
|
8307
8308
|
enableProgressiveLoading: true,
|
|
8308
8309
|
// loaders: [TerrainLoader],
|
|
8310
|
+
elevationScale: 1,
|
|
8309
8311
|
};
|
|
8310
8312
|
// Turns array of templates into a single string to work around shallow change
|
|
8311
8313
|
function urlTemplateToUpdateTrigger(template) {
|
|
@@ -8483,7 +8485,7 @@ class CogTerrainLayer extends CompositeLayer {
|
|
|
8483
8485
|
}
|
|
8484
8486
|
renderSubLayers(props) {
|
|
8485
8487
|
const SubLayerClass = this.getSubLayerClass('mesh', SimpleMeshLayer);
|
|
8486
|
-
const { color, wireframe, terrainOptions } = this.props;
|
|
8488
|
+
const { color, wireframe, terrainOptions, elevationScale } = this.props;
|
|
8487
8489
|
const { data } = props;
|
|
8488
8490
|
if (!data) {
|
|
8489
8491
|
return null;
|
|
@@ -8503,12 +8505,20 @@ class CogTerrainLayer extends CompositeLayer {
|
|
|
8503
8505
|
} : {
|
|
8504
8506
|
material: this.props.material
|
|
8505
8507
|
};
|
|
8508
|
+
const elevationScaleVal = elevationScale ?? 1;
|
|
8509
|
+
const modelMatrix = [
|
|
8510
|
+
1, 0, 0, 0,
|
|
8511
|
+
0, 1, 0, 0,
|
|
8512
|
+
0, 0, elevationScaleVal, 0,
|
|
8513
|
+
0, 0, 0, 1,
|
|
8514
|
+
];
|
|
8506
8515
|
return new SubLayerClass({ ...props, tileSize: props.tileSize }, {
|
|
8507
8516
|
...lightingProps,
|
|
8508
8517
|
data: DUMMY_DATA,
|
|
8509
8518
|
mesh: meshResult?.map,
|
|
8510
8519
|
texture: tileTexture,
|
|
8511
8520
|
_instanced: false,
|
|
8521
|
+
modelMatrix,
|
|
8512
8522
|
pickable: props.pickable,
|
|
8513
8523
|
coordinateSystem: COORDINATE_SYSTEM.CARTESIAN,
|
|
8514
8524
|
// Dynamic polygon offset: pull higher zoom levels closer to camera to depth-test in front.
|
|
@@ -8628,6 +8638,7 @@ class CogTerrainLayer extends CompositeLayer {
|
|
|
8628
8638
|
renderSubLayers: {
|
|
8629
8639
|
disableTexture: this.props.disableTexture,
|
|
8630
8640
|
terrainOptions: this.props.terrainOptions,
|
|
8641
|
+
elevationScale: this.props.elevationScale,
|
|
8631
8642
|
},
|
|
8632
8643
|
},
|
|
8633
8644
|
onViewportLoad: this.onViewportLoad.bind(this),
|