@gisatcz/deckgl-geolib 2.6.0 → 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/cjs/index.js
CHANGED
|
@@ -8204,7 +8204,7 @@ class CogBitmapLayer extends core.CompositeLayer {
|
|
|
8204
8204
|
});
|
|
8205
8205
|
}
|
|
8206
8206
|
renderLayers() {
|
|
8207
|
-
const { clampToTerrain, maxRequests, onTileLoad, onTileUnload, onTileError, maxCacheSize, maxCacheByteSize, refinementStrategy, cogBitmapOptions, } = this.props;
|
|
8207
|
+
const { clampToTerrain, maxRequests, onTileLoad, onTileUnload, onTileError, maxCacheSize, maxCacheByteSize, refinementStrategy, cogBitmapOptions, zRange, } = this.props;
|
|
8208
8208
|
if (this.state.isTiled && this.state.initialized) {
|
|
8209
8209
|
const { tileSize } = this.state.bitmapCogTiles;
|
|
8210
8210
|
return new geoLayers.TileLayer(this.getSubLayerProps({
|
|
@@ -8214,6 +8214,7 @@ class CogBitmapLayer extends core.CompositeLayer {
|
|
|
8214
8214
|
renderSubLayers: this.renderSubLayers.bind(this),
|
|
8215
8215
|
pickable: this.props.pickable,
|
|
8216
8216
|
onClick: this.props.onClick,
|
|
8217
|
+
zRange,
|
|
8217
8218
|
updateTriggers: {
|
|
8218
8219
|
getTileData: [
|
|
8219
8220
|
// rasterData: urlTemplateToUpdateTrigger(rasterData),
|
|
@@ -8308,6 +8309,7 @@ const defaultProps = {
|
|
|
8308
8309
|
// Enable progressive loading by default (overview tiles first, then detail)
|
|
8309
8310
|
enableProgressiveLoading: true,
|
|
8310
8311
|
// loaders: [TerrainLoader],
|
|
8312
|
+
elevationScale: 1,
|
|
8311
8313
|
};
|
|
8312
8314
|
// Turns array of templates into a single string to work around shallow change
|
|
8313
8315
|
function urlTemplateToUpdateTrigger(template) {
|
|
@@ -8485,7 +8487,7 @@ class CogTerrainLayer extends core.CompositeLayer {
|
|
|
8485
8487
|
}
|
|
8486
8488
|
renderSubLayers(props) {
|
|
8487
8489
|
const SubLayerClass = this.getSubLayerClass('mesh', meshLayers.SimpleMeshLayer);
|
|
8488
|
-
const { color, wireframe, terrainOptions } = this.props;
|
|
8490
|
+
const { color, wireframe, terrainOptions, elevationScale } = this.props;
|
|
8489
8491
|
const { data } = props;
|
|
8490
8492
|
if (!data) {
|
|
8491
8493
|
return null;
|
|
@@ -8505,12 +8507,20 @@ class CogTerrainLayer extends core.CompositeLayer {
|
|
|
8505
8507
|
} : {
|
|
8506
8508
|
material: this.props.material
|
|
8507
8509
|
};
|
|
8510
|
+
const elevationScaleVal = elevationScale ?? 1;
|
|
8511
|
+
const modelMatrix = [
|
|
8512
|
+
1, 0, 0, 0,
|
|
8513
|
+
0, 1, 0, 0,
|
|
8514
|
+
0, 0, elevationScaleVal, 0,
|
|
8515
|
+
0, 0, 0, 1,
|
|
8516
|
+
];
|
|
8508
8517
|
return new SubLayerClass({ ...props, tileSize: props.tileSize }, {
|
|
8509
8518
|
...lightingProps,
|
|
8510
8519
|
data: DUMMY_DATA,
|
|
8511
8520
|
mesh: meshResult?.map,
|
|
8512
8521
|
texture: tileTexture,
|
|
8513
8522
|
_instanced: false,
|
|
8523
|
+
modelMatrix,
|
|
8514
8524
|
pickable: props.pickable,
|
|
8515
8525
|
coordinateSystem: core.COORDINATE_SYSTEM.CARTESIAN,
|
|
8516
8526
|
// Dynamic polygon offset: pull higher zoom levels closer to camera to depth-test in front.
|
|
@@ -8630,6 +8640,7 @@ class CogTerrainLayer extends core.CompositeLayer {
|
|
|
8630
8640
|
renderSubLayers: {
|
|
8631
8641
|
disableTexture: this.props.disableTexture,
|
|
8632
8642
|
terrainOptions: this.props.terrainOptions,
|
|
8643
|
+
elevationScale: this.props.elevationScale,
|
|
8633
8644
|
},
|
|
8634
8645
|
},
|
|
8635
8646
|
onViewportLoad: this.onViewportLoad.bind(this),
|