Method
MaplibreNativeFfiRenderSessionget_cluster_leaves_async
Declaration [src]
void
maplibre_native_ffi_render_session_get_cluster_leaves_async (
MaplibreNativeFfiRenderSession* self,
const char* source_id,
guint32 cluster_id,
guint32 limit,
guint32 offset,
GAsyncReadyCallback callback,
gpointer user_data
)
Description [src]
Reads the points in a cluster of a clustered GeoJSON source.
cluster_id is the “cluster_id” property of a cluster feature. The result is
a GeoJSON feature collection of the original point features. It skips the first offset points and then holds up to limit of them, so a limit of 0
gives an empty collection.
A cluster ID can go out of date as
maplibre_native_ffi_render_session_get_cluster_children_async() describes.
See mln_render_session_get_cluster_leaves in the
C API reference.
It fails with these errors:
MAPLIBRE_NATIVE_FFI_ERROR_NOT_FOUNDwhen the session’s most recent render attempt had no source namedsource_id, or the source has no clustercluster_id.MAPLIBRE_NATIVE_FFI_ERROR_INVALID_ARGUMENTwhen the source isn’t a GeoJSON source with clustering turned on.
This method completes asynchronously. Use maplibre_native_ffi_render_session_get_cluster_leaves_finish() inside the GAsyncReadyCallback to obtain the result of the operation.
Parameters
source_id-
Type:
const char*The UTF-8 text.
The data is owned by the caller of the method. The value is a NUL terminated UTF-8 string. cluster_id-
Type:
guint32No description available.
limit-
Type:
guint32No description available.
offset-
Type:
guint32No description available.
callback-
Type:
GAsyncReadyCallbackThe callback to call when the call finishes.
The argument can be NULL. user_data-
Type:
gpointerThe data to pass to
callback.The argument can be NULL.The data is owned by the caller of the method.