From 8e20740d9b893ffee7784146de70e764bdbccdd2 Mon Sep 17 00:00:00 2001 From: Junqiu Lei Date: Thu, 23 Feb 2023 12:54:13 -0800 Subject: [PATCH] Fix custom layer render opacity config (#289) * Fix custom layer render opacity config Signed-off-by: Junqiu Lei * update release note Signed-off-by: Junqiu Lei --------- Signed-off-by: Junqiu Lei (cherry picked from commit a6b8912b4e039bab4a704bbf4a6a380d76d0ba2d) --- public/model/customLayerFunctions.ts | 1 + .../opensearch-dashboards-maps.release-notes-2.6.0.0.md | 3 +++ 2 files changed, 4 insertions(+) diff --git a/public/model/customLayerFunctions.ts b/public/model/customLayerFunctions.ts index 5da7fe92..e5a0100b 100644 --- a/public/model/customLayerFunctions.ts +++ b/public/model/customLayerFunctions.ts @@ -73,6 +73,7 @@ const addNewLayer = ( layerConfig.zoomRange[0], layerConfig.zoomRange[1] ); + maplibreInstance.setPaintProperty(layerConfig.id, 'raster-opacity', layerConfig.opacity / 100); } }; diff --git a/release-notes/opensearch-dashboards-maps.release-notes-2.6.0.0.md b/release-notes/opensearch-dashboards-maps.release-notes-2.6.0.0.md index 081990dd..575d16ae 100644 --- a/release-notes/opensearch-dashboards-maps.release-notes-2.6.0.0.md +++ b/release-notes/opensearch-dashboards-maps.release-notes-2.6.0.0.md @@ -20,3 +20,6 @@ Compatible with OpenSearch and OpenSearch Dashboards Version 2.6.0 * Add scroll bar when more layers added ([#254](https://github.com/opensearch-project/dashboards-maps/pull/254)) * Align items in add new layer modal ([#256](https://github.com/opensearch-project/dashboards-maps/pull/256)) * Add indexPatterns to map embeddable output for dashboard filters ([#272](https://github.com/opensearch-project/dashboards-maps/pull/272)) + +### Bug Fixes +* Fix custom layer render opacity config ([#289](https://github.com/opensearch-project/dashboards-maps/pull/289))