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
contextMapContext to which the assets belong.
-
Registers a font under a font name. After registration, the font name can be used in
- the SVG
texttag asfont-familyattribute parameter when creating aMapImagewithImageFormat.SVG. MapMarker.TextStyle
Repeated registration with the same font name is ignored.
Declaration
Swift
public func registerFont(fontName: String, fontPath: String)Parameters
fontNameA font name.
fontPathA font file path. TTF, OTF and WOFF formats are supported. Can be an absolute file path or a resolved bundle resource path.
- the SVG
-
Registers a font set under a font name. After registration, the font name can be used in
- the SVG
texttag asfont-familyattribute parameter when creating aMapImagewithImageFormat.SVG. MapMarker.TextStyle
Repeated registration with the same font name is ignored.
Declaration
Swift
public func registerFontWithFallback(fontName: String, fontPath: String, fallbackFontFilePaths: [String])Parameters
fontNameA font name.
fontPathA font file path. TTF, OTF and WOFF formats are supported. Can be an absolute file path or a resolved bundle resource path.
fallbackFontFilePathsAdditional font files are intended to be used if main font does not contain required character symbol and shall be sorted starting from most useful.
- the SVG