This repository has been archived by the owner on Aug 8, 2023. It is now read-only.
SDK runtime styling enumerations don’t match mbgl equivalents #6760
Labels
bug
iOS
Mapbox Maps SDK for iOS
macOS
Mapbox Maps SDK for macOS
release blocker
Blocks the next final release
runtime styling
Milestone
mbgl::LineJoinType
has three values intended for public use, in order:By contrast, the iOS and macOS SDK’s
MGLLineJoin
type has:So if you try to get the
lineJoin
of an MGLLineStyleLayer that hasline-join
set toround
in the style JSON, you get an MGLStyleValue containingMGLLineJoinMiter
, because MGLStyleValueTransformer assumes that the mbgl type was defined in the same order as the style specification. But the style specification defines these values in an object, so it’s unsafe to assume any order in the first place.MGLStyleValueTransformer needs to explicitly map style JSON string values to Objective-C enumeration values. In this case, we’d use
mbgl::LineJoinType_names
. We should also add assertions or tests to catch these issues earlier: #6464.The Android SDK doesn’t appear to suffer from this issue because it uses string constants throughout.
/cc @frederoni @jfirebaugh @bsudekum
The text was updated successfully, but these errors were encountered: