AssetsManager

public class AssetsManager
extension AssetsManager: NativeBase
extension AssetsManager: Hashable

Assets manager interface. Can be used to make assets available to the SDK.

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.

  • Creates an instance of AssetsManager.

    Declaration

    Swift

    public init(_ context: MapContext)

    Parameters

    context

    MapContext to which the assets belong.

  • Registers a font under a font name. After registration, the font name can be used in

    Repeated registration with the same font name is ignored.

    Declaration

    Swift

    public func registerFont(fontName: String, fontPath: String)

    Parameters

    fontName

    A font name.

    fontPath

    A font file path. TTF, OTF and WOFF formats are supported. Can be an absolute file path or a resolved bundle resource path.

  • Registers a font set under a font name. After registration, the font name can be used in

    Repeated registration with the same font name is ignored.

    Declaration

    Swift

    public func registerFontWithFallback(fontName: String, fontPath: String, fallbackFontFilePaths: [String])

    Parameters

    fontName

    A font name.

    fontPath

    A font file path. TTF, OTF and WOFF formats are supported. Can be an absolute file path or a resolved bundle resource path.

    fallbackFontFilePaths

    Additional font files are intended to be used if main font does not contain required character symbol and shall be sorted starting from most useful.