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
 
const mln_json_valuecluster_properties
 
uint32_t tile_size
 
uint32_t buffer
 
uint32_t cluster_radius
 
uint32_t cluster_min_points
 
bool line_metrics
 
bool cluster
 

Detailed Description

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.

Field Documentation

◆ buffer

uint32_t mln_geojson_source_options::buffer

Tile buffer in pixels. 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. 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.

◆ 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

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.

◆ cluster_radius

uint32_t mln_geojson_source_options::cluster_radius

Cluster radius in pixels. 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. Defaults to 18.

◆ min_zoom

double mln_geojson_source_options::min_zoom

Minimum tiling zoom. Defaults to 0.

◆ tile_size

uint32_t mln_geojson_source_options::tile_size

Tile extent in pixels. Defaults to 512.

◆ 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: