I'm trying to migrate from mapbox-sdk-3.7
to mapbox-sdk-4.0
.
I can't understand how to convert this syntax with MGLConstantStyleValue
to NSExpression
.
let layer = style.layer(withIdentifier: "milestones") as? MGLSymbolStyleLayer
let styledValues: [String: MGLStyleValue<NSString>] = ...
layer.iconImageName = MGLConstantStyleValue(interpolationMode: .identity,
sourceStops: styledValues,
attributeName: "imageId")