Skip to content

Kepler.gl is a powerful open source geospatial analysis tool for large-scale data sets.

(bugfix) Ensure all colors returned from get3DBuildingColor are RGB arrays (#871)

Jon Sadka6d5c629834ad
diff --git a/src/reducers/map-style-updaters.js b/src/reducers/map-style-updaters.js
index 363043907..03d4b4c42 100644
--- a/src/reducers/map-style-updaters.js
+++ b/src/reducers/map-style-updaters.js
@@ -189,7 +189,7 @@ function findLayerFillColor(layer) {
function get3DBuildingColor(style) {
// set building color to be the same as the background color.
if (!style.style) {
- return DEFAULT_BLDG_COLOR;
+ return hexToRgb(DEFAULT_BLDG_COLOR);
}
const backgroundLayer = (style.style.layers || []).find(
@@ -288,7 +288,8 @@ export const mapStyleChangeUpdater = (state, {payload: styleType}) => {
);
const threeDBuildingColor = state.custom3DBuildingColor ? state.threeDBuildingColor :
- get3DBuildingColor(state.mapStyles[styleType]);
+ get3DBuildingColor(state.mapStyles[styleType]);
+
return {
...state,
styleType,