You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
this doesn't seem to be possible to set with the JSON expression converter at all in Native right now.
It crashes on iOS and logs an error on Android. Both with the same error message: Error setting property: text-variable-anchor-offset anchor offset must have two numbers
investigation copied from Slack thread:
Details
Does anyone have insight into setting textVariableAnchorOffset programmatically on a symbol layer? I’m trying to get this working with MapLibre Compose, but I just get: “Error setting property: text-variable-anchor-offset anchor offset must have two numbers” on both iOS and Android.
So it needs to be a literal array, and expressions within the array aren’t supported. That makes this pretty rough to use (edited) 11:01
extra interestingly, doing the same literal construct with the JSON converter presents an error: “Nested literal arrays are not supported.”
but we see above that nested literal arrays aren’t just supported, they’re required by this property. Feels like a bug to me
sargunv
changed the title
Properly type and support text variable anchor offset on symbol layer
SymbolLayer.textVariableAnchorOffset can't be set to any value but nil()Dec 19, 2024
related: maplibre/maplibre-native#2358
this doesn't seem to be possible to set with the JSON expression converter at all in Native right now.
It crashes on iOS and logs an error on Android. Both with the same error message: Error setting property: text-variable-anchor-offset anchor offset must have two numbers
investigation copied from Slack thread:
Details
Does anyone have insight into setting textVariableAnchorOffset programmatically on a symbol layer? I’m trying to get this working with MapLibre Compose, but I just get: “Error setting property: text-variable-anchor-offset anchor offset must have two numbers” on both iOS and Android.
Here’s some sample code on Android:
(edited)
4 replies
sargunv
27 minutes ago
Setting it with a regular Array instead of via an Expression works fine, but I want to support expressions
sargunv
15 minutes ago
relevant C++ code: https://github.com/maplibre/maplibre-native/blob/c94864f1a9a742d09d4619ec6aa786bb46824cb0/src/mbgl/style/conversion/constant.cpp#L176
nothing jumps out as an obvious cause here; my value seems to be meeting the conditions presented there but it’s still erroring
sargunv
5 minutes ago
Interestingly, this works:
So it needs to be a literal array, and expressions within the array aren’t supported. That makes this pretty rough to use (edited)
11:01
extra interestingly, doing the same literal construct with the JSON converter presents an error: “Nested literal arrays are not supported.”
but we see above that nested literal arrays aren’t just supported, they’re required by this property. Feels like a bug to me
The text was updated successfully, but these errors were encountered: