diff --git a/public/app/plugins/panel/geomap/editor/StyleRuleEditor.tsx b/public/app/plugins/panel/geomap/editor/StyleRuleEditor.tsx index 8f185ff22fe..a63c15f69db 100644 --- a/public/app/plugins/panel/geomap/editor/StyleRuleEditor.tsx +++ b/public/app/plugins/panel/geomap/editor/StyleRuleEditor.tsx @@ -152,7 +152,7 @@ export const StyleRuleEditor: FC diff --git a/public/app/plugins/panel/geomap/utils/checkFeatureMatchesStyleRule.test.ts b/public/app/plugins/panel/geomap/utils/checkFeatureMatchesStyleRule.test.ts index 1a1d4e5a0ee..65e27150ce9 100644 --- a/public/app/plugins/panel/geomap/utils/checkFeatureMatchesStyleRule.test.ts +++ b/public/app/plugins/panel/geomap/utils/checkFeatureMatchesStyleRule.test.ts @@ -18,6 +18,16 @@ describe('check if feature matches style rule', () => { feature ) ).toEqual(true); + expect( + checkFeatureMatchesStyleRule( + { + operation: ComparisonOperation.EQ, + property: 'number', + value: '3', + }, + feature + ) + ).toEqual(true); expect( checkFeatureMatchesStyleRule( { diff --git a/public/app/plugins/panel/geomap/utils/checkFeatureMatchesStyleRule.ts b/public/app/plugins/panel/geomap/utils/checkFeatureMatchesStyleRule.ts index ff85a712651..b5ed69dccb2 100644 --- a/public/app/plugins/panel/geomap/utils/checkFeatureMatchesStyleRule.ts +++ b/public/app/plugins/panel/geomap/utils/checkFeatureMatchesStyleRule.ts @@ -11,7 +11,7 @@ export const checkFeatureMatchesStyleRule = (rule: FeatureRuleConfig, feature: F const val = feature.get(rule.property); switch (rule.operation) { case ComparisonOperation.EQ: - return val === rule.value; + return `${val}` === `${rule.value}`; case ComparisonOperation.NEQ: return val !== rule.value; case ComparisonOperation.GT: