|
MapLibre Native C API
Public C ABI for the MapLibre Native wrapper.
|
#include <style.h>
Data Fields | |
| double | min_zoom |
| double | max_zoom |
| double | tolerance |
| double | cluster_max_zoom |
| mln_buffer_view | cluster_properties |
| uint32_t | buffer |
| uint32_t | cluster_radius |
| uint32_t | cluster_min_points |
| bool | line_metrics |
| bool | cluster |
| bool | synchronous_tiling |
Options for GeoJSON sources, indexed and rendered at a fixed 512-pixel tile size.
These options are fixed for the source's lifetime. URL updates preserve them, and prepared data updates require matching options.
| uint32_t mln_geojson_source_options::buffer |
Tile buffer in pixels within [0, 512]. Defaults to 128.
| bool mln_geojson_source_options::cluster |
Clusters point features. Defaults to false.
Clustering applies to feature collections whose every feature carries point geometry. mln_geojson_source_data_create() rejects a bare geometry, a single feature, or a feature collection that mixes in other geometry. An empty feature collection stays accepted and carries nothing to cluster.
| double mln_geojson_source_options::cluster_max_zoom |
Highest zoom that clusters points. Defaults to 17.
| uint32_t mln_geojson_source_options::cluster_min_points |
Points required to form a cluster. Defaults to 2.
| mln_buffer_view mln_geojson_source_options::cluster_properties |
Cluster aggregation expressions keyed by property name, as a JSON object whose members follow the MapLibre Style Spec clusterProperties form. The UTF-8 bytes are borrowed for the call.
| uint32_t mln_geojson_source_options::cluster_radius |
Cluster radius in pixels within [0, 4095]. Defaults to 50.
| bool mln_geojson_source_options::line_metrics |
Adds line distance metrics to line features. Defaults to false.
| double mln_geojson_source_options::max_zoom |
Maximum tiling zoom, an integer within [0, 24]. Defaults to 18.
| double mln_geojson_source_options::min_zoom |
Minimum tiling zoom. Defaults to 0.
| bool mln_geojson_source_options::synchronous_tiling |
Tiles the data for the next render update instead of in the background. Defaults to false.
A rendered frame may still wait for tile layout. mln_map_set_geojson_source_synchronous_tiling() overrides this at runtime.
| double mln_geojson_source_options::tolerance |
Douglas-Peucker simplification tolerance. Defaults to 0.375.