MapLibre Native C API
Public C ABI for the MapLibre Native wrapper.
Loading...
Searching...
No Matches
mln_custom_mvt_vector_source_options Struct Reference

#include <style.h>

Data Fields

mln_custom_mvt_vector_source_tile_callback fetch_tile
 
mln_custom_mvt_vector_source_tile_callback cancel_tile
 
void * user_data
 
mln_custom_mvt_vector_source_release_callback release_user_data
 

Detailed Description

Options for custom MVT vector sources.

Field Documentation

◆ cancel_tile

mln_custom_mvt_vector_source_tile_callback mln_custom_mvt_vector_source_options::cancel_tile

Optional best-effort tile cancel callback.

◆ fetch_tile

mln_custom_mvt_vector_source_tile_callback mln_custom_mvt_vector_source_options::fetch_tile

Required tile fetch callback.

◆ release_user_data

mln_custom_mvt_vector_source_release_callback mln_custom_mvt_vector_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.

◆ user_data

void* mln_custom_mvt_vector_source_options::user_data

Caller-owned callback context retained by pointer.


The documentation for this struct was generated from the following file: