fix: use correct color for categorized/choropleth layers in browser

This commit is contained in:
Yohan Boniface 2024-07-09 11:58:29 +02:00
parent dd9c3ba194
commit 00483882a1

View file

@ -37,7 +37,7 @@ export default class Browser {
? U.Icon.prototype.formatUrl(feature._getIconUrl(), feature)
: null
title.textContent = feature.getDisplayName() || '—'
const bgcolor = feature.getDynamicOption('color')
const bgcolor = feature.getDynamicOption(feature.staticOptions.mainColor)
colorBox.style.backgroundColor = bgcolor
if (symbol && symbol !== U.SCHEMA.iconUrl.default) {
const icon = U.Icon.makeIconElement(symbol, colorBox)