Skip to main content

Asset

Methods

Methods

registerTexture

registerTexture(id: string, iconSrc: string): Promise<void>

Bundle Embed

Introduced 3.1.68.12-7-g858688944a

Register a texture to use with subsequent calls like Tag.editIcon.

Note: It is recommended to host your own images to mitigate cross origin limitations.

mpSdk.Asset.registerTexture('customTextureId', 'https://[link.to/image]');
ParameterType
idstring
A user specified string to use as a lookup of this texture
iconSrcstring
The src of the icon, like the src of an <img>

Returns: Promise<void>