addImage

Adds an image to be used in the style. This API can also be used for updating an image. If the image id was already added, it gets replaced by the new image.

The image can be used in icon-image, fill-pattern, and line-pattern.

See https://www.mapbox.com/mapbox-gl-js/style-spec/#layout-symbol-icon-image See https://www.mapbox.com/mapbox-gl-js/style-spec/#paint-line-line-pattern See https://www.mapbox.com/mapbox-gl-js/style-spec/#paint-fill-fill-pattern

The image's pixel dimensions are assumed to match the device's screen density. They are divided by the screen density to determine the display size in density-independent pixels. To add an image with a different density, use addStyleImage with an explicit scale parameter.

Return

A string describing an error if the operation was not successful, empty otherwise.

Parameters

imageId

ID of the image.

image

Pixel data of the image.

sdf

Option to treat whether image is SDF(signed distance field) or not.


Adds an image to be used in the style. This API can also be used for updating an image. If the image id was already added, it gets replaced by the new image.

The image can be used in icon-image, fill-pattern, and line-pattern.

See https://www.mapbox.com/mapbox-gl-js/style-spec/#layout-symbol-icon-image See https://www.mapbox.com/mapbox-gl-js/style-spec/#paint-line-line-pattern See https://www.mapbox.com/mapbox-gl-js/style-spec/#paint-fill-fill-pattern

The image's pixel dimensions are assumed to match the device's screen density. They are divided by the screen density to determine the display size in density-independent pixels. To add an image with a different density, use addStyleImage with an explicit scale parameter.

Return

A string describing an error if the operation was not successful, empty otherwise.

Parameters

imageId

ID of the image.

image

Pixel data of the image.


Adds an image to be used in the style. This API can also be used for updating an image. If the image id was already added, it gets replaced by the new image.

The image can be used in icon-image, fill-pattern, and line-pattern.

See https://www.mapbox.com/mapbox-gl-js/style-spec/#layout-symbol-icon-image See https://www.mapbox.com/mapbox-gl-js/style-spec/#paint-line-line-pattern See https://www.mapbox.com/mapbox-gl-js/style-spec/#paint-fill-fill-pattern

The bitmap's pixel dimensions are assumed to match the device's screen density. They are divided by the screen density to determine the display size in density-independent pixels. To add an image with a different density, use addStyleImage with an explicit scale parameter.

Return

A string describing an error if the operation was not successful, empty otherwise.

Parameters

imageId

ID of the image.

bitmap

The bitmap image.

sdf

Option to treat whether image is SDF(signed distance field) or not.


Adds an image to be used in the style. This API can also be used for updating an image. If the image id was already added, it gets replaced by the new image.

The image can be used in icon-image, fill-pattern, and line-pattern.

See https://www.mapbox.com/mapbox-gl-js/style-spec/#layout-symbol-icon-image See https://www.mapbox.com/mapbox-gl-js/style-spec/#paint-line-line-pattern See https://www.mapbox.com/mapbox-gl-js/style-spec/#paint-fill-fill-pattern

The bitmap's pixel dimensions are assumed to match the device's screen density. They are divided by the screen density to determine the display size in density-independent pixels. To add an image with a different density, use addStyleImage with an explicit scale parameter.

Return

A string describing an error if the operation was not successful, empty otherwise.

Parameters

imageId

ID of the image.

bitmap

The bitmap image.