Hi! We’re using the OpenFreeMap Positron style as our MapLibre basemap:
https://tiles.openfreemap.org/styles/positron
We consistently see this browser console error:
Expected value to be of type number, but found null instead.
Context
Suspected cause
The style layer boundary_3 appears to do numeric comparisons on admin_level:
>= admin_level 3
<= admin_level 6
Some features seem to have admin_level: null, which triggers the runtime expression type warning.
Expected behavior
No expression type errors in console when rendering the style.
Workaround on our side
We suppress the error by replacing the filter with a null-safe variant that first checks type:
['==', ['typeof', ['get', 'admin_level']], 'number']
- then the numeric comparisons.
Could the style be updated to guard admin_level before numeric comparisons in boundary_3?
Thanks!
Hi! We’re using the OpenFreeMap Positron style as our MapLibre basemap:
https://tiles.openfreemap.org/styles/positron
We consistently see this browser console error:
Context
Suspected cause
The style layer
boundary_3appears to do numeric comparisons onadmin_level:>= admin_level 3<= admin_level 6Some features seem to have
admin_level: null, which triggers the runtime expression type warning.Expected behavior
No expression type errors in console when rendering the style.
Workaround on our side
We suppress the error by replacing the filter with a null-safe variant that first checks type:
['==', ['typeof', ['get', 'admin_level']], 'number']Could the style be updated to guard
admin_levelbefore numeric comparisons inboundary_3?Thanks!