add Style 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
Return
A string describing an error if the operation was not successful, empty otherwise.
Parameters
An array of four numbers, with the first two specifying the left, top corner, and the last two specifying the right, bottom corner. If present, and if the icon uses icon-text-fit, the symbol's text will be fit inside the content box.
Pixel data of the image.
ID of the image.
Scale factor for the image.
Option to treat whether image is SDF(signed distance field) or not.
An array of two-element arrays, consisting of two numbers that represent the from position and the to position of areas that can be stretched horizontally.
An array of two-element arrays, consisting of two numbers that represent the from position and the to position of areas that can be stretched vertically.