Method
MaplibreNativeFfiRenderSessionget_cluster_children_async
Declaration [src]
void
maplibre_native_ffi_render_session_get_cluster_children_async (
MaplibreNativeFfiRenderSession* self,
const char* source_id,
guint32 cluster_id,
GAsyncReadyCallback callback,
gpointer user_data
)
Description [src]
Reads the children of a cluster in a clustered GeoJSON source.
cluster_id is the “cluster_id” property of a cluster feature. The result is
a GeoJSON feature collection of the clusters and points that the cluster
splits into at the next zoom level.
The query reads the source’s data from the session’s most recent render attempt, so a change to the data shows once the session tries to render again.
A cluster ID belongs to one version of the source’s data. After the data
changes, feature queries can return IDs from the earlier version until the
source’s tiles reload, and such an ID completes with
MAPLIBRE_NATIVE_FFI_ERROR_NOT_FOUND or names a different cluster. Query the
features again for current IDs.
See mln_render_session_get_cluster_children 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_children_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.
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.