mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2024-12-27 09:15:29 +01:00
Fix layer color swatch in <FeatureLayerPopup/>
This commit is contained in:
parent
fcfc7ab874
commit
df98cb9c7b
1 changed files with 2 additions and 2 deletions
|
@ -66,7 +66,7 @@ class FeatureLayerPopup extends React.Component {
|
|||
color = styleFunction.convertFunction(color, propertySpec);
|
||||
}
|
||||
|
||||
const exprResult = expression.createExpression(color, propertySpec);
|
||||
const exprResult = expression.createExpression(String(color), propertySpec);
|
||||
const val = exprResult.value.evaluate({
|
||||
zoom: zoom
|
||||
}, feature);
|
||||
|
@ -84,7 +84,7 @@ class FeatureLayerPopup extends React.Component {
|
|||
// This is quite complex, just incase there's an edgecase we're missing
|
||||
// always return black if we get an unexpected error.
|
||||
catch (err) {
|
||||
console.error("Unable to get feature color, error:", err);
|
||||
console.warn("Unable to get feature color, error:", err);
|
||||
return "black";
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue