setStyleImage method
- String imageId,
- PremultipliedRgba8Image image, {
- StyleImageOptions? options,
Adds an image to the map's style, or replaces the image named imageId.
See mln_map_set_style_image in the
C API reference.
Errors:
Status.invalidStatewhile the style isn't loaded, asMapHandle.setStyleUrl()describes.
Implementation
Future<CommandCompletion> setStyleImage(
String imageId,
PremultipliedRgba8Image image, {
StyleImageOptions? options,
}) => _command(
(arena, completion) => raw.mln_map_set_style_image(
_handle.raw,
nativeStringView(imageId, arena).value,
_writePremultipliedRgba8Image(image, arena),
options == null ? nullptr : _writeStyleImageOptions(options, arena),
completion,
nativeDiagnostic,
),
);