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

#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

Detailed Description

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.

Field Documentation

◆ buffer

uint32_t mln_geojson_source_options::buffer

Tile buffer in pixels within [0, 512]. Defaults to 128.

◆ cluster

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.

◆ cluster_max_zoom

double mln_geojson_source_options::cluster_max_zoom

Highest zoom that clusters points. Defaults to 17.

◆ cluster_min_points

uint32_t mln_geojson_source_options::cluster_min_points

Points required to form a cluster. Defaults to 2.

◆ cluster_properties

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.

◆ cluster_radius

uint32_t mln_geojson_source_options::cluster_radius

Cluster radius in pixels within [0, 4095]. Defaults to 50.

◆ line_metrics

bool mln_geojson_source_options::line_metrics

Adds line distance metrics to line features. Defaults to false.

◆ max_zoom

double mln_geojson_source_options::max_zoom

Maximum tiling zoom, an integer within [0, 24]. Defaults to 18.

◆ min_zoom

double mln_geojson_source_options::min_zoom

Minimum tiling zoom. Defaults to 0.

◆ synchronous_tiling

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.

◆ tolerance

double mln_geojson_source_options::tolerance

Douglas-Peucker simplification tolerance. Defaults to 0.375.


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