setBitmap method
Method is used to specify the decoded raster for the cluster marker.
bitmap Image provider: Android com.navigine.image.ImageProvider; iOS UIImage via binding; Flutter navigine_sdk ImageProvider.
Returns true if the operation is successful, false otherwise.
Example:
final clusterBitmap = ImageProvider.fromFile("/path/to/cluster.png");
final bitmapSuccess = cluster.setBitmap(clusterBitmap);
print("Set cluster bitmap from ImageProvider: $bitmapSuccess");
Implementation
@override
bool setBitmap(ImageProvider bitmap) {
final _setBitmapFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction<
Uint8 Function(Pointer<Void>, Pointer<Void>),
int Function(Pointer<Void>, Pointer<Void>)
>('navigine_sdk_flutter_ClusterMapObject_setBitmap__Bitmap'));
final _bitmapHandle = ImageProviderImpl.getNativePtr(bitmap);
final __resultHandle = _setBitmapFfi(this.ptr, _bitmapHandle);
ImageProviderImpl.releaseNativePtr(_bitmapHandle);
final _result = (__resultHandle != 0);
exception.checkCallResult();
return _result;
}