Skip to content

Commit

Permalink
Change geolib terrain layer props
Browse files Browse the repository at this point in the history
  • Loading branch information
vdubr committed May 13, 2024
1 parent 2425972 commit 17e787a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 19 deletions.
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"@deck.gl/mesh-layers": "^9.0.6",
"@deck.gl/react": "^9.0.6",
"@gisatcz/cross-package-react-context": "^0.2.0",
"@gisatcz/deckgl-geolib": "^1.10.2-dev.2",
"@gisatcz/deckgl-geolib": "^1.10.2-dev.4",
"@gisatcz/ptr-atoms": "^1.9.0",
"@gisatcz/ptr-core": "^1.8.0",
"@gisatcz/ptr-tile-grid": "^0.2.0",
Expand Down
20 changes: 9 additions & 11 deletions src/DeckGlMap/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -365,18 +365,15 @@ const DeckGlMap = ({
const {key, options} = layer;

const {url, terrainOptions, ...restOptions} = options;

return new CogTerrainLayer(
{
id: key,
elevationData: url,
onClick: onRasterLayerClick,
...restOptions,
},
{
return new CogTerrainLayer({
id: key,
elevationData: url,
onClick: onRasterLayerClick,
...restOptions,
terrainOptions: {
...terrainOptions,
}
);
},
});
};

/**
Expand All @@ -388,6 +385,7 @@ const DeckGlMap = ({
if (layer && layer instanceof Layer) {
return layer;
} else if (layer && layer.type) {
//memoize result by layer
switch (layer.type) {
case 'wmts':
return getTileLayer(layer);
Expand Down

0 comments on commit 17e787a

Please sign in to comment.