|
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 |
| const mln_json_value * | cluster_properties |
| uint32_t | tile_size |
| uint32_t | buffer |
| uint32_t | cluster_radius |
| uint32_t | cluster_min_points |
| bool | line_metrics |
| bool | cluster |
Options for GeoJSON sources.
MapLibre Native fixes these options when the source is created, so mln_map_set_geojson_source_url() and mln_map_set_geojson_source_data() keep the options the source was added with.
| uint32_t mln_geojson_source_options::buffer |
Tile buffer in pixels. 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. MapLibre Native clusters feature collections only, so mln_map_add_geojson_source_data() and mln_map_set_geojson_source_data() reject a bare geometry or a single feature, along with 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.
| const mln_json_value* 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 descriptor graph is borrowed for the call.
| uint32_t mln_geojson_source_options::cluster_radius |
Cluster radius in pixels. 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. Defaults to 18.
| double mln_geojson_source_options::min_zoom |
Minimum tiling zoom. Defaults to 0.
| uint32_t mln_geojson_source_options::tile_size |
Tile extent in pixels. Defaults to 512.
| double mln_geojson_source_options::tolerance |
Douglas-Peucker simplification tolerance. Defaults to 0.375.