gi-nx / loadImage
ts
function loadImage(url: string, key?: string): Promise<string>;Load an image from a URL to mapbox, the key of which can be further referenced by styles. see https://docs.mapbox.com/style-spec/reference/layers/#layout-symbol-icon-image
returns a promise that resolves to the image key (string) when loaded or null if loading failed
Parameters
| Parameter | Type |
|---|---|
url | string |
key? | string |
Returns
Promise<string>