Skip to content

Commit

Permalink
feat(frontend): added opacity setting to data layer
Browse files Browse the repository at this point in the history
  • Loading branch information
allynt committed Jul 6, 2023
1 parent 0f8ccb7 commit b44d435
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/BaseMap/TiledRasterLayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export class TiledRasterLayer extends CompositeLayer {
return [
new TileLayer({
data: this.props.data,
opacity: this.props.opacity,
minZoom: 0,
maxZoom: 20,
tileSize: 256,
Expand Down Expand Up @@ -32,5 +33,6 @@ TiledRasterLayer.layerName = 'TiledRasterLayer';
TiledRasterLayer.defaultProps = {
// BitmapLayer properties
data: null,
opacity: 1.0,
bounds: { type: 'object', value: [], async: true },
};
1 change: 1 addition & 0 deletions src/pages/DataLayer/DataLayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ const DataLayer = ({
const layers = [
new TiledRasterLayer({
data,
opacity: 0.5,
}),
];

Expand Down

0 comments on commit b44d435

Please sign in to comment.