跳到主要内容

flywave-mapview.poimanager.addtextureatlas

Home > @flywave/flywave-mapview > PoiManager > addTextureAtlas

PoiManager.addTextureAtlas() method

Load the texture atlas that defines the segments of the texture that should be used for specific icons.

Signature:

addTextureAtlas(imageName: string, atlas: string, abortSignal?: AbortSignal): Promise<void>;

Parameters

Parameter

Type

Description

imageName

string

Name of the image from the theme (NOT the url!).

atlas

string

URL of the JSON file defining the texture atlas.

abortSignal

AbortSignal

(Optional) Signal to Abort the loading of the Atlas Image

Returns:



Promise&lt;void&gt;

## Remarks

Creates an for every element in the atlas, such that it can be addressed in the theme file.