6#ifndef MAPLIBRE_NATIVE_C_STYLE_H
7#define MAPLIBRE_NATIVE_C_STYLE_H
23typedef uint64_t mln_style_id_list;
24typedef uint64_t mln_style_string_list;
25typedef uint64_t mln_geojson_source_data;
29 MLN_STYLE_SOURCE_TYPE_UNKNOWN = 0,
30 MLN_STYLE_SOURCE_TYPE_VECTOR = 1,
31 MLN_STYLE_SOURCE_TYPE_RASTER = 2,
32 MLN_STYLE_SOURCE_TYPE_RASTER_DEM = 3,
33 MLN_STYLE_SOURCE_TYPE_GEOJSON = 4,
34 MLN_STYLE_SOURCE_TYPE_IMAGE = 5,
35 MLN_STYLE_SOURCE_TYPE_VIDEO = 6,
36 MLN_STYLE_SOURCE_TYPE_ANNOTATIONS = 7,
37 MLN_STYLE_SOURCE_TYPE_CUSTOM_VECTOR = 8,
38 MLN_STYLE_SOURCE_TYPE_CUSTOM_MVT_VECTOR = 9,
59 MLN_STYLE_TILE_SOURCE_OPTION_MIN_ZOOM = 1U << 0U,
60 MLN_STYLE_TILE_SOURCE_OPTION_MAX_ZOOM = 1U << 1U,
61 MLN_STYLE_TILE_SOURCE_OPTION_ATTRIBUTION = 1U << 2U,
62 MLN_STYLE_TILE_SOURCE_OPTION_SCHEME = 1U << 3U,
63 MLN_STYLE_TILE_SOURCE_OPTION_BOUNDS = 1U << 4U,
64 MLN_STYLE_TILE_SOURCE_OPTION_TILE_SIZE = 1U << 5U,
65 MLN_STYLE_TILE_SOURCE_OPTION_VECTOR_ENCODING = 1U << 6U,
66 MLN_STYLE_TILE_SOURCE_OPTION_RASTER_ENCODING = 1U << 7U,
71 MLN_STYLE_TILE_SCHEME_XYZ = 0,
72 MLN_STYLE_TILE_SCHEME_TMS = 1,
77 MLN_STYLE_VECTOR_TILE_ENCODING_MVT = 0,
78 MLN_STYLE_VECTOR_TILE_ENCODING_MLT = 1,
83 MLN_STYLE_RASTER_DEM_ENCODING_MAPBOX = 0,
84 MLN_STYLE_RASTER_DEM_ENCODING_TERRARIUM = 1,
115 MLN_STYLE_IMAGE_TEXT_FIT_STRETCH_OR_SHRINK = 0,
116 MLN_STYLE_IMAGE_TEXT_FIT_STRETCH_ONLY = 1,
117 MLN_STYLE_IMAGE_TEXT_FIT_PROPORTIONAL = 2,
122 MLN_STYLE_LAYER_VISIBILITY_VISIBLE = 0,
123 MLN_STYLE_LAYER_VISIBILITY_NONE = 1,
128 MLN_GEOJSON_SOURCE_OPTION_MIN_ZOOM = 1U << 0U,
129 MLN_GEOJSON_SOURCE_OPTION_MAX_ZOOM = 1U << 1U,
130 MLN_GEOJSON_SOURCE_OPTION_TOLERANCE = 1U << 2U,
131 MLN_GEOJSON_SOURCE_OPTION_CLUSTER_MAX_ZOOM = 1U << 3U,
132 MLN_GEOJSON_SOURCE_OPTION_CLUSTER_PROPERTIES = 1U << 4U,
133 MLN_GEOJSON_SOURCE_OPTION_TILE_SIZE = 1U << 5U,
134 MLN_GEOJSON_SOURCE_OPTION_BUFFER = 1U << 6U,
135 MLN_GEOJSON_SOURCE_OPTION_CLUSTER_RADIUS = 1U << 7U,
136 MLN_GEOJSON_SOURCE_OPTION_CLUSTER_MIN_POINTS = 1U << 8U,
137 MLN_GEOJSON_SOURCE_OPTION_LINE_METRICS = 1U << 9U,
138 MLN_GEOJSON_SOURCE_OPTION_CLUSTER = 1U << 10U,
139 MLN_GEOJSON_SOURCE_OPTION_SYNCHRONOUS_TILING = 1U << 11U,
144 MLN_CUSTOM_GEOMETRY_SOURCE_OPTION_MIN_ZOOM = 1U << 0U,
145 MLN_CUSTOM_GEOMETRY_SOURCE_OPTION_MAX_ZOOM = 1U << 1U,
146 MLN_CUSTOM_GEOMETRY_SOURCE_OPTION_TOLERANCE = 1U << 2U,
147 MLN_CUSTOM_GEOMETRY_SOURCE_OPTION_TILE_SIZE = 1U << 3U,
148 MLN_CUSTOM_GEOMETRY_SOURCE_OPTION_BUFFER = 1U << 4U,
149 MLN_CUSTOM_GEOMETRY_SOURCE_OPTION_CLIP = 1U << 5U,
150 MLN_CUSTOM_GEOMETRY_SOURCE_OPTION_WRAP = 1U << 6U,
155 MLN_CUSTOM_MVT_VECTOR_SOURCE_OPTION_MIN_ZOOM = 1U << 0U,
156 MLN_CUSTOM_MVT_VECTOR_SOURCE_OPTION_MAX_ZOOM = 1U << 1U,
161 MLN_STYLE_IMAGE_OPTION_PIXEL_RATIO = 1U << 0U,
162 MLN_STYLE_IMAGE_OPTION_SDF = 1U << 1U,
163 MLN_STYLE_IMAGE_OPTION_STRETCH_X = 1U << 2U,
164 MLN_STYLE_IMAGE_OPTION_STRETCH_Y = 1U << 3U,
165 MLN_STYLE_IMAGE_OPTION_CONTENT = 1U << 4U,
166 MLN_STYLE_IMAGE_OPTION_TEXT_FIT_WIDTH = 1U << 5U,
167 MLN_STYLE_IMAGE_OPTION_TEXT_FIT_HEIGHT = 1U << 6U,
172 MLN_STYLE_TRANSITION_OPTION_DURATION = 1U << 0U,
173 MLN_STYLE_TRANSITION_OPTION_DELAY = 1U << 1U,
174 MLN_STYLE_TRANSITION_OPTION_ENABLE_PLACEMENT_TRANSITIONS = 1U << 2U,
179 MLN_LOCATION_INDICATOR_IMAGE_KIND_TOP = 0,
180 MLN_LOCATION_INDICATOR_IMAGE_KIND_BEARING = 1,
181 MLN_LOCATION_INDICATOR_IMAGE_KIND_SHADOW = 2,
194 bool has_attribution;
402 size_t stretch_x_count;
408 size_t stretch_y_count;
434 size_t stretch_y_count;
444 bool has_text_fit_width;
445 bool has_text_fit_height;
571 mln_style_string_list list,
size_t* out_count
592 mln_style_string_list list
719 size_t attribution_capacity,
size_t* out_attribution_size,
bool* out_found
745 mln_map map,
mln_buffer_view source_id,
char* out_url,
size_t url_capacity,
746 size_t* out_url_size,
bool* out_found
768 mln_map map,
mln_buffer_view source_id, mln_style_string_list* out_tile_urls,
787 mln_map map, mln_style_id_list* out_source_ids
843 mln_geojson_source_data* out_data
854 mln_geojson_source_data data
1377 size_t pixel_capacity,
size_t* out_byte_length,
bool* out_found
1404 size_t stretch_x_capacity,
size_t* out_stretch_x_count,
1406 size_t* out_stretch_y_count,
bool* out_found
1519 size_t coordinate_count
1542 size_t coordinate_capacity,
size_t* out_coordinate_count,
bool* out_found
1775 mln_map map, mln_style_id_list* out_layer_ids
1814 mln_map map,
mln_buffer_view layer_id, mln_buffer* out_layer,
bool* out_found
1968 mln_buffer* out_value
2059 size_t source_layer_capacity,
size_t* out_source_layer_size
2110 size_t source_id_capacity,
size_t* out_source_id_size
mln_status
Definition base.h:39
void * user_data
Definition style.h:318
mln_custom_geometry_source_release_callback release_user_data
Definition style.h:340
mln_custom_geometry_source_tile_callback fetch_tile
Definition style.h:314
mln_custom_geometry_source_tile_callback cancel_tile
Definition style.h:316
mln_custom_mvt_vector_source_release_callback release_user_data
Definition style.h:377
mln_custom_mvt_vector_source_tile_callback cancel_tile
Definition style.h:358
mln_custom_mvt_vector_source_tile_callback fetch_tile
Definition style.h:356
void * user_data
Definition style.h:360
bool synchronous_tiling
Definition style.h:290
double min_zoom
Definition style.h:247
double max_zoom
Definition style.h:249
mln_buffer_view cluster_properties
Definition style.h:259
uint32_t buffer
Definition style.h:263
double tolerance
Definition style.h:251
double cluster_max_zoom
Definition style.h:253
uint32_t cluster_radius
Definition style.h:265
bool line_metrics
Definition style.h:269
uint32_t cluster_min_points
Definition style.h:267
bool cluster
Definition style.h:279
uint32_t tile_size
Definition style.h:261
const uint8_t * pixels
Definition style.h:388
uint32_t stride
Definition style.h:386
size_t byte_length
Definition style.h:390
uint32_t text_fit_width
Definition style.h:438
uint32_t text_fit_height
Definition style.h:440
size_t stretch_x_count
Definition style.h:433
mln_image_content content
Definition style.h:436
uint32_t stride
Definition style.h:427
uint32_t text_fit_width
Definition style.h:412
const mln_image_stretch * stretch_y
Definition style.h:407
float pixel_ratio
Definition style.h:416
mln_image_content content
Definition style.h:410
bool sdf
Definition style.h:418
const mln_image_stretch * stretch_x
Definition style.h:401
uint32_t text_fit_height
Definition style.h:414
uint32_t type
Definition style.h:188
size_t id_size
Definition style.h:192
double min_zoom
Definition style.h:202
size_t attribution_size
Definition style.h:196
uint32_t scheme
Definition style.h:206
size_t tile_count
Definition style.h:200
uint32_t fields
Definition style.h:190
mln_lat_lng_bounds bounds
Definition style.h:208
size_t url_size
Definition style.h:198
uint32_t tile_size
Definition style.h:210
double max_zoom
Definition style.h:204
uint32_t vector_encoding
Definition style.h:212
uint32_t raster_encoding
Definition style.h:214
uint32_t raster_encoding
Definition style.h:232
uint32_t scheme
Definition style.h:225
uint32_t tile_size
Definition style.h:228
uint32_t vector_encoding
Definition style.h:230
double duration_ms
Definition style.h:477
double delay_ms
Definition style.h:484
bool enable_placement_transitions
Definition style.h:496
void mln_geojson_source_data_destroy(mln_geojson_source_data data)
mln_style_image_option_field
Definition style.h:160
mln_status mln_map_get_layer_max_zoom(mln_map map, mln_buffer_view layer_id, double *out_max_zoom)
mln_status mln_map_list_style_layer_ids(mln_map map, mln_style_id_list *out_layer_ids)
mln_style_image_options mln_style_image_options_default(void)
void(* mln_custom_mvt_vector_source_release_callback)(void *user_data)
Definition style.h:349
mln_status mln_map_get_image_source_coordinates(mln_map map, mln_buffer_view source_id, mln_lat_lng *out_coordinates, size_t coordinate_capacity, size_t *out_coordinate_count, bool *out_found)
mln_status mln_map_copy_style_image_premultiplied_rgba8(mln_map map, mln_buffer_view image_id, uint8_t *out_pixels, size_t pixel_capacity, size_t *out_byte_length, bool *out_found)
mln_status mln_map_set_custom_geometry_source_tile_data(mln_map map, mln_buffer_view source_id, mln_canonical_tile_id tile_id, mln_buffer_view data)
mln_status mln_map_add_raster_source_url(mln_map map, mln_buffer_view source_id, mln_buffer_view url, const mln_style_tile_source_options *options)
mln_status mln_map_add_style_layer_json(mln_map map, mln_buffer_view layer_json, mln_buffer_view before_layer_id)
mln_status mln_map_get_style_light_property(mln_map map, mln_buffer_view property_name, mln_buffer *out_value)
mln_status mln_map_add_custom_geometry_source(mln_map map, mln_buffer_view source_id, const mln_custom_geometry_source_options *options)
mln_status mln_map_add_raster_dem_source_url(mln_map map, mln_buffer_view source_id, mln_buffer_view url, const mln_style_tile_source_options *options)
mln_status mln_map_set_custom_mvt_vector_source_tile_error(mln_map map, mln_buffer_view source_id, mln_canonical_tile_id tile_id, mln_buffer_view message)
mln_style_tile_source_option_field
Definition style.h:58
mln_status mln_map_copy_style_source_url(mln_map map, mln_buffer_view source_id, char *out_url, size_t url_capacity, size_t *out_url_size, bool *out_found)
mln_status mln_style_id_list_count(mln_style_id_list list, size_t *out_count)
void(* mln_custom_mvt_vector_source_tile_callback)(void *user_data, mln_canonical_tile_id tile_id)
Definition style.h:344
mln_status mln_map_set_image_source_coordinates(mln_map map, mln_buffer_view source_id, const mln_lat_lng *coordinates, size_t coordinate_count)
mln_status mln_map_set_style_light_property(mln_map map, mln_buffer_view property_name, mln_buffer_view value)
mln_status mln_map_set_style_transition_options(mln_map map, const mln_style_transition_options *options)
mln_status mln_map_add_color_relief_layer(mln_map map, mln_buffer_view layer_id, mln_buffer_view source_id, mln_buffer_view before_layer_id)
mln_status mln_map_add_vector_source_url(mln_map map, mln_buffer_view source_id, mln_buffer_view url, const mln_style_tile_source_options *options)
mln_status mln_map_set_geojson_source_url(mln_map map, mln_buffer_view source_id, mln_buffer_view url)
mln_status mln_map_invalidate_custom_geometry_source_tile(mln_map map, mln_buffer_view source_id, mln_canonical_tile_id tile_id)
mln_custom_mvt_vector_source_options mln_custom_mvt_vector_source_options_default(void)
mln_status mln_map_set_layer_source_id(mln_map map, mln_buffer_view layer_id, mln_buffer_view source_id)
mln_status mln_map_set_image_source_image(mln_map map, mln_buffer_view source_id, const mln_premultiplied_rgba8_image *image)
mln_status mln_map_get_layer_visibility(mln_map map, mln_buffer_view layer_id, uint32_t *out_visibility)
mln_custom_mvt_vector_source_option_field
Definition style.h:154
mln_status mln_map_style_source_exists(mln_map map, mln_buffer_view source_id, bool *out_exists)
mln_status mln_map_add_image_source_image(mln_map map, mln_buffer_view source_id, const mln_lat_lng *coordinates, size_t coordinate_count, const mln_premultiplied_rgba8_image *image)
mln_status mln_map_set_style_light_json(mln_map map, mln_buffer_view light_json)
void mln_style_string_list_destroy(mln_style_string_list list)
mln_premultiplied_rgba8_image mln_premultiplied_rgba8_image_default(void)
mln_status mln_map_invalidate_custom_mvt_vector_source_tile(mln_map map, mln_buffer_view source_id, mln_canonical_tile_id tile_id)
mln_status mln_map_get_style_transition_options(mln_map map, mln_style_transition_options *out_options)
mln_status mln_map_set_custom_mvt_vector_source_tile_data(mln_map map, mln_buffer_view source_id, mln_canonical_tile_id tile_id, mln_buffer_view data)
mln_status mln_map_get_style_source_type(mln_map map, mln_buffer_view source_id, uint32_t *out_source_type, bool *out_found)
mln_status mln_map_set_location_indicator_accuracy_radius(mln_map map, mln_buffer_view layer_id, double radius)
mln_geojson_source_options mln_geojson_source_options_default(void)
mln_status mln_map_add_location_indicator_layer(mln_map map, mln_buffer_view layer_id, mln_buffer_view before_layer_id)
void(* mln_custom_geometry_source_release_callback)(void *user_data)
Definition style.h:307
mln_status mln_map_add_style_source_json(mln_map map, mln_buffer_view source_id, mln_buffer_view source_json)
mln_style_vector_tile_encoding
Definition style.h:76
mln_status mln_map_set_layer_filter(mln_map map, mln_buffer_view layer_id, const mln_buffer_view *filter)
mln_style_layer_visibility
Definition style.h:121
mln_status mln_map_remove_style_source(mln_map map, mln_buffer_view source_id, bool *out_removed)
mln_status mln_map_get_style_source_info(mln_map map, mln_buffer_view source_id, mln_style_source_info *out_info, bool *out_found)
mln_status mln_style_id_list_get(mln_style_id_list list, size_t index, mln_buffer_view *out_id)
mln_style_tile_scheme
Definition style.h:70
mln_status mln_map_add_raster_source_tiles(mln_map map, mln_buffer_view source_id, const mln_buffer_view *tiles, size_t tile_count, const mln_style_tile_source_options *options)
mln_status mln_map_add_image_source_url(mln_map map, mln_buffer_view source_id, const mln_lat_lng *coordinates, size_t coordinate_count, mln_buffer_view url)
mln_status mln_map_remove_style_image(mln_map map, mln_buffer_view image_id, bool *out_removed)
mln_status mln_map_add_custom_mvt_vector_source(mln_map map, mln_buffer_view source_id, const mln_custom_mvt_vector_source_options *options)
mln_style_source_type
Definition style.h:28
mln_custom_geometry_source_options mln_custom_geometry_source_options_default(void)
mln_status mln_map_set_style_image(mln_map map, mln_buffer_view image_id, const mln_premultiplied_rgba8_image *image, const mln_style_image_options *options)
mln_status mln_map_invalidate_custom_geometry_source_region(mln_map map, mln_buffer_view source_id, mln_lat_lng_bounds bounds)
mln_style_transition_option_field
Definition style.h:171
mln_status mln_style_string_list_get(mln_style_string_list list, size_t index, mln_buffer_view *out_value)
mln_status mln_map_set_image_source_url(mln_map map, mln_buffer_view source_id, mln_buffer_view url)
mln_status mln_map_move_style_layer(mln_map map, mln_buffer_view layer_id, mln_buffer_view before_layer_id)
mln_status mln_map_set_layer_source_layer(mln_map map, mln_buffer_view layer_id, mln_buffer_view source_layer)
mln_status mln_map_add_vector_source_tiles(mln_map map, mln_buffer_view source_id, const mln_buffer_view *tiles, size_t tile_count, const mln_style_tile_source_options *options)
mln_status mln_map_set_location_indicator_image_name(mln_map map, mln_buffer_view layer_id, uint32_t image_kind, mln_buffer_view image_id)
mln_status mln_map_get_layer_min_zoom(mln_map map, mln_buffer_view layer_id, double *out_min_zoom)
mln_style_tile_source_options mln_style_tile_source_options_default(void)
mln_style_raster_dem_encoding
Definition style.h:82
mln_style_image_info mln_style_image_info_default(void)
mln_status mln_map_style_image_exists(mln_map map, mln_buffer_view image_id, bool *out_exists)
void mln_style_id_list_destroy(mln_style_id_list list)
mln_status mln_map_get_style_layer_json(mln_map map, mln_buffer_view layer_id, mln_buffer *out_layer, bool *out_found)
mln_status mln_map_set_geojson_source_synchronous_tiling(mln_map map, mln_buffer_view source_id, bool enabled)
mln_status mln_map_get_style_source_tile_urls(mln_map map, mln_buffer_view source_id, mln_style_string_list *out_tile_urls, bool *out_found)
mln_status mln_map_add_geojson_source_data(mln_map map, mln_buffer_view source_id, mln_geojson_source_data data)
mln_status mln_map_set_layer_max_zoom(mln_map map, mln_buffer_view layer_id, double max_zoom)
mln_status mln_map_set_layer_min_zoom(mln_map map, mln_buffer_view layer_id, double min_zoom)
mln_style_source_info_field
Definition style.h:42
@ MLN_STYLE_SOURCE_INFO_URL
Definition style.h:44
@ MLN_STYLE_SOURCE_INFO_BOUNDS
Definition style.h:48
@ MLN_STYLE_SOURCE_INFO_TILEJSON
Definition style.h:46
@ MLN_STYLE_SOURCE_INFO_VECTOR_ENCODING
Definition style.h:52
@ MLN_STYLE_SOURCE_INFO_RASTER_ENCODING
Definition style.h:54
@ MLN_STYLE_SOURCE_INFO_TILE_SIZE
Definition style.h:50
mln_custom_geometry_source_option_field
Definition style.h:143
mln_status mln_map_copy_layer_source_id(mln_map map, mln_buffer_view layer_id, char *out_source_id, size_t source_id_capacity, size_t *out_source_id_size)
mln_status mln_map_set_location_indicator_bearing(mln_map map, mln_buffer_view layer_id, double bearing)
mln_status mln_map_remove_style_layer(mln_map map, mln_buffer_view layer_id, bool *out_removed)
mln_status mln_map_copy_style_image_stretches(mln_map map, mln_buffer_view image_id, mln_image_stretch *out_stretch_x, size_t stretch_x_capacity, size_t *out_stretch_x_count, mln_image_stretch *out_stretch_y, size_t stretch_y_capacity, size_t *out_stretch_y_count, bool *out_found)
mln_location_indicator_image_kind
Definition style.h:178
mln_status mln_map_list_style_source_ids(mln_map map, mln_style_id_list *out_source_ids)
mln_status mln_map_add_geojson_source_url(mln_map map, mln_buffer_view source_id, mln_buffer_view url, const mln_geojson_source_options *options)
mln_status mln_map_add_hillshade_layer(mln_map map, mln_buffer_view layer_id, mln_buffer_view source_id, mln_buffer_view before_layer_id)
mln_status mln_map_get_style_image_info(mln_map map, mln_buffer_view image_id, mln_style_image_info *out_info, bool *out_found)
mln_status mln_style_string_list_count(mln_style_string_list list, size_t *out_count)
mln_status mln_map_add_raster_dem_source_tiles(mln_map map, mln_buffer_view source_id, const mln_buffer_view *tiles, size_t tile_count, const mln_style_tile_source_options *options)
mln_status mln_map_set_layer_visibility(mln_map map, mln_buffer_view layer_id, uint32_t visibility)
mln_status mln_map_set_location_indicator_location(mln_map map, mln_buffer_view layer_id, mln_lat_lng coordinate, double altitude)
mln_geojson_source_option_field
Definition style.h:127
mln_status mln_map_style_layer_exists(mln_map map, mln_buffer_view layer_id, bool *out_exists)
mln_status mln_map_set_layer_property(mln_map map, mln_buffer_view layer_id, mln_buffer_view property_name, mln_buffer_view value)
mln_status mln_map_set_geojson_source_data(mln_map map, mln_buffer_view source_id, mln_geojson_source_data data)
mln_status mln_map_get_layer_filter(mln_map map, mln_buffer_view layer_id, mln_buffer *out_filter)
mln_style_image_text_fit
Definition style.h:114
mln_status mln_map_get_layer_property(mln_map map, mln_buffer_view layer_id, mln_buffer_view property_name, mln_buffer *out_value)
mln_status mln_map_copy_layer_source_layer(mln_map map, mln_buffer_view layer_id, char *out_source_layer, size_t source_layer_capacity, size_t *out_source_layer_size)
mln_status mln_map_get_style_layer_type(mln_map map, mln_buffer_view layer_id, mln_buffer_view *out_layer_type, bool *out_found)
void(* mln_custom_geometry_source_tile_callback)(void *user_data, mln_canonical_tile_id tile_id)
Definition style.h:302
mln_style_transition_options mln_style_transition_options_default(void)
mln_status mln_map_copy_style_source_attribution(mln_map map, mln_buffer_view source_id, char *out_attribution, size_t attribution_capacity, size_t *out_attribution_size, bool *out_found)
mln_status mln_geojson_source_data_create(mln_buffer_view data, const mln_geojson_source_options *options, mln_geojson_source_data *out_data)