JsonStyleFactory
public class JsonStyleFactory
extension JsonStyleFactory: NativeBase
extension JsonStyleFactory: Hashable
A factory of Style objects from styles defined in JSON format.
For more details see Custom Layer Style Reference in the documentation.
Note: This is a beta release of this feature, so there could be a few bugs and unexpected behavior. Related APIs may change for new releases without a deprecation process.
-
Thrown when failing to create a
Stylefrom a JSON source.Declaration
Swift
public typealias InstantiationError = InstantiationErrorDetails -
Declaration
Swift
public struct InstantiationErrorDetailsextension JsonStyleFactory.InstantiationErrorDetails : Error -
Creates an instance of Style from a JSON string.
Declaration
Swift
public static func createFromString(_ styleString: String) throws -> StyleParameters
styleStringJSON style string.
Return Value
Style instance.