|
MapLibre Native C API
Public C ABI for the MapLibre Native wrapper.
|
#include <style.h>
Data Fields | |
| mln_custom_geometry_source_tile_callback | fetch_tile |
| mln_custom_geometry_source_tile_callback | cancel_tile |
| void * | user_data |
| mln_custom_geometry_source_release_callback | release_user_data |
Options for custom geometry sources.
| mln_custom_geometry_source_tile_callback mln_custom_geometry_source_options::cancel_tile |
Optional best-effort tile cancel callback.
| mln_custom_geometry_source_tile_callback mln_custom_geometry_source_options::fetch_tile |
Required tile fetch callback.
| mln_custom_geometry_source_release_callback mln_custom_geometry_source_options::release_user_data |
Optional. Invoked once when this API stops referencing user_data.
The call runs on the map owner thread when the source is removed explicitly, when a style load replaces the style that held the source, or when the map is destroyed. It runs at most once, and it does not run when adding the source failed. A host frees its callback state here. Null means the host needs no release.
This callback must not destroy its map, because a release that a style load drives runs inside MapLibre's style-load dispatch. Free callback state and return. A host that wants to destroy the map does so from its own call after the pump that reported the load returns.
| void* mln_custom_geometry_source_options::user_data |
Caller-owned callback context retained by pointer.