6#ifndef MAPLIBRE_NATIVE_C_STYLE_H
7#define MAPLIBRE_NATIVE_C_STYLE_H
23typedef struct mln_style_id_list mln_style_id_list;
27 MLN_STYLE_SOURCE_TYPE_UNKNOWN = 0,
28 MLN_STYLE_SOURCE_TYPE_VECTOR = 1,
29 MLN_STYLE_SOURCE_TYPE_RASTER = 2,
30 MLN_STYLE_SOURCE_TYPE_RASTER_DEM = 3,
31 MLN_STYLE_SOURCE_TYPE_GEOJSON = 4,
32 MLN_STYLE_SOURCE_TYPE_IMAGE = 5,
33 MLN_STYLE_SOURCE_TYPE_VIDEO = 6,
34 MLN_STYLE_SOURCE_TYPE_ANNOTATIONS = 7,
35 MLN_STYLE_SOURCE_TYPE_CUSTOM_VECTOR = 8,
40 MLN_STYLE_TILE_SOURCE_OPTION_MIN_ZOOM = 1U << 0U,
41 MLN_STYLE_TILE_SOURCE_OPTION_MAX_ZOOM = 1U << 1U,
42 MLN_STYLE_TILE_SOURCE_OPTION_ATTRIBUTION = 1U << 2U,
43 MLN_STYLE_TILE_SOURCE_OPTION_SCHEME = 1U << 3U,
44 MLN_STYLE_TILE_SOURCE_OPTION_BOUNDS = 1U << 4U,
45 MLN_STYLE_TILE_SOURCE_OPTION_TILE_SIZE = 1U << 5U,
46 MLN_STYLE_TILE_SOURCE_OPTION_VECTOR_ENCODING = 1U << 6U,
47 MLN_STYLE_TILE_SOURCE_OPTION_RASTER_ENCODING = 1U << 7U,
52 MLN_STYLE_TILE_SCHEME_XYZ = 0,
53 MLN_STYLE_TILE_SCHEME_TMS = 1,
58 MLN_STYLE_VECTOR_TILE_ENCODING_MVT = 0,
59 MLN_STYLE_VECTOR_TILE_ENCODING_MLT = 1,
64 MLN_STYLE_RASTER_DEM_ENCODING_MAPBOX = 0,
65 MLN_STYLE_RASTER_DEM_ENCODING_TERRARIUM = 1,
70 MLN_CUSTOM_GEOMETRY_SOURCE_OPTION_MIN_ZOOM = 1U << 0U,
71 MLN_CUSTOM_GEOMETRY_SOURCE_OPTION_MAX_ZOOM = 1U << 1U,
72 MLN_CUSTOM_GEOMETRY_SOURCE_OPTION_TOLERANCE = 1U << 2U,
73 MLN_CUSTOM_GEOMETRY_SOURCE_OPTION_TILE_SIZE = 1U << 3U,
74 MLN_CUSTOM_GEOMETRY_SOURCE_OPTION_BUFFER = 1U << 4U,
75 MLN_CUSTOM_GEOMETRY_SOURCE_OPTION_CLIP = 1U << 5U,
76 MLN_CUSTOM_GEOMETRY_SOURCE_OPTION_WRAP = 1U << 6U,
81 MLN_STYLE_IMAGE_OPTION_PIXEL_RATIO = 1U << 0U,
82 MLN_STYLE_IMAGE_OPTION_SDF = 1U << 1U,
87 MLN_LOCATION_INDICATOR_IMAGE_KIND_TOP = 0,
88 MLN_LOCATION_INDICATOR_IMAGE_KIND_BEARING = 1,
89 MLN_LOCATION_INDICATOR_IMAGE_KIND_SHADOW = 2,
100 bool has_attribution;
218 const mln_style_id_list* list,
size_t* out_count
356 size_t attribution_capacity,
size_t* out_attribution_size,
bool* out_found
374 mln_map* map, mln_style_id_list** out_source_ids
760 size_t pixel_capacity,
size_t* out_byte_length,
bool* out_found
873 size_t coordinate_count
896 size_t coordinate_capacity,
size_t* out_coordinate_count,
bool* out_found
1124 mln_map* map, mln_style_id_list** out_layer_ids
1162 mln_map* map,
mln_string_view layer_id, mln_json_snapshot** out_layer,
1221 mln_map* map,
mln_string_view property_name, mln_json_snapshot** out_value
1266 mln_json_snapshot** out_value
1307 mln_map* map,
mln_string_view layer_id, mln_json_snapshot** out_filter
mln_status
Definition base.h:37
void * user_data
Definition style.h:144
mln_custom_geometry_source_tile_callback fetch_tile
Definition style.h:140
mln_custom_geometry_source_tile_callback cancel_tile
Definition style.h:142
const uint8_t * pixels
Definition style.h:162
uint32_t stride
Definition style.h:160
size_t byte_length
Definition style.h:164
uint32_t stride
Definition style.h:183
float pixel_ratio
Definition style.h:172
bool sdf
Definition style.h:174
uint32_t type
Definition style.h:96
size_t id_size
Definition style.h:98
size_t attribution_size
Definition style.h:102
uint32_t raster_encoding
Definition style.h:120
uint32_t scheme
Definition style.h:113
uint32_t tile_size
Definition style.h:116
uint32_t vector_encoding
Definition style.h:118
mln_style_image_option_field
Definition style.h:80
mln_status mln_map_set_layer_property(mln_map *map, mln_string_view layer_id, mln_string_view property_name, const mln_json_value *value)
mln_style_image_options mln_style_image_options_default(void)
mln_status mln_map_get_style_light_property(mln_map *map, mln_string_view property_name, mln_json_snapshot **out_value)
mln_status mln_map_add_custom_geometry_source(mln_map *map, mln_string_view source_id, const mln_custom_geometry_source_options *options)
mln_status mln_map_set_style_light_json(mln_map *map, const mln_json_value *light_json)
mln_status mln_map_add_vector_source_tiles(mln_map *map, mln_string_view source_id, const mln_string_view *tiles, size_t tile_count, const mln_style_tile_source_options *options)
mln_status mln_map_style_layer_exists(mln_map *map, mln_string_view layer_id, bool *out_exists)
mln_style_tile_source_option_field
Definition style.h:39
mln_status mln_map_set_geojson_source_data(mln_map *map, mln_string_view source_id, const mln_geojson *data)
mln_status mln_map_move_style_layer(mln_map *map, mln_string_view layer_id, mln_string_view before_layer_id)
mln_status mln_map_set_layer_filter(mln_map *map, mln_string_view layer_id, const mln_json_value *filter)
mln_status mln_map_add_hillshade_layer(mln_map *map, mln_string_view layer_id, mln_string_view source_id, mln_string_view before_layer_id)
mln_status mln_map_add_image_source_url(mln_map *map, mln_string_view source_id, const mln_lat_lng *coordinates, size_t coordinate_count, mln_string_view url)
mln_status mln_map_set_image_source_url(mln_map *map, mln_string_view source_id, mln_string_view url)
mln_status mln_map_set_style_image(mln_map *map, mln_string_view image_id, const mln_premultiplied_rgba8_image *image, const mln_style_image_options *options)
mln_status mln_map_get_style_image_info(mln_map *map, mln_string_view image_id, mln_style_image_info *out_info, bool *out_found)
mln_status mln_map_add_raster_source_url(mln_map *map, mln_string_view source_id, mln_string_view url, const mln_style_tile_source_options *options)
mln_status mln_map_style_image_exists(mln_map *map, mln_string_view image_id, bool *out_exists)
mln_status mln_map_add_raster_dem_source_tiles(mln_map *map, mln_string_view source_id, const mln_string_view *tiles, size_t tile_count, const mln_style_tile_source_options *options)
mln_status mln_map_set_location_indicator_accuracy_radius(mln_map *map, mln_string_view layer_id, double radius)
mln_status mln_map_remove_style_layer(mln_map *map, mln_string_view layer_id, bool *out_removed)
mln_status mln_map_get_style_layer_json(mln_map *map, mln_string_view layer_id, mln_json_snapshot **out_layer, bool *out_found)
mln_status mln_map_get_style_layer_type(mln_map *map, mln_string_view layer_id, mln_string_view *out_layer_type, bool *out_found)
mln_status mln_map_get_image_source_coordinates(mln_map *map, mln_string_view source_id, mln_lat_lng *out_coordinates, size_t coordinate_capacity, size_t *out_coordinate_count, bool *out_found)
mln_premultiplied_rgba8_image mln_premultiplied_rgba8_image_default(void)
mln_status mln_map_set_geojson_source_url(mln_map *map, mln_string_view source_id, mln_string_view url)
mln_status mln_map_remove_style_image(mln_map *map, mln_string_view image_id, bool *out_removed)
mln_status mln_map_set_location_indicator_bearing(mln_map *map, mln_string_view layer_id, double bearing)
mln_status mln_map_set_image_source_image(mln_map *map, mln_string_view source_id, const mln_premultiplied_rgba8_image *image)
mln_style_vector_tile_encoding
Definition style.h:57
mln_status mln_map_add_geojson_source_url(mln_map *map, mln_string_view source_id, mln_string_view url)
mln_status mln_map_set_location_indicator_location(mln_map *map, mln_string_view layer_id, mln_lat_lng coordinate, double altitude)
mln_status mln_map_add_color_relief_layer(mln_map *map, mln_string_view layer_id, mln_string_view source_id, mln_string_view before_layer_id)
mln_status mln_map_invalidate_custom_geometry_source_region(mln_map *map, mln_string_view source_id, mln_lat_lng_bounds bounds)
mln_status mln_map_get_layer_property(mln_map *map, mln_string_view layer_id, mln_string_view property_name, mln_json_snapshot **out_value)
mln_status mln_map_copy_style_image_premultiplied_rgba8(mln_map *map, mln_string_view image_id, uint8_t *out_pixels, size_t pixel_capacity, size_t *out_byte_length, bool *out_found)
mln_style_tile_scheme
Definition style.h:51
mln_status mln_map_list_style_layer_ids(mln_map *map, mln_style_id_list **out_layer_ids)
void mln_style_id_list_destroy(mln_style_id_list *list)
mln_status mln_map_remove_style_source(mln_map *map, mln_string_view source_id, bool *out_removed)
mln_status mln_map_add_location_indicator_layer(mln_map *map, mln_string_view layer_id, mln_string_view before_layer_id)
mln_style_source_type
Definition style.h:26
mln_custom_geometry_source_options mln_custom_geometry_source_options_default(void)
mln_status mln_map_style_source_exists(mln_map *map, mln_string_view source_id, bool *out_exists)
mln_status mln_map_add_geojson_source_data(mln_map *map, mln_string_view source_id, const mln_geojson *data)
mln_status mln_map_set_style_light_property(mln_map *map, mln_string_view property_name, const mln_json_value *value)
mln_status mln_map_get_style_source_info(mln_map *map, mln_string_view source_id, mln_style_source_info *out_info, bool *out_found)
mln_status mln_map_get_style_source_type(mln_map *map, mln_string_view source_id, uint32_t *out_source_type, bool *out_found)
mln_status mln_map_list_style_source_ids(mln_map *map, mln_style_id_list **out_source_ids)
mln_status mln_map_add_vector_source_url(mln_map *map, mln_string_view source_id, mln_string_view url, const mln_style_tile_source_options *options)
mln_status mln_map_set_location_indicator_image_name(mln_map *map, mln_string_view layer_id, uint32_t image_kind, mln_string_view image_id)
mln_status mln_map_copy_style_source_attribution(mln_map *map, mln_string_view source_id, char *out_attribution, size_t attribution_capacity, size_t *out_attribution_size, bool *out_found)
mln_style_tile_source_options mln_style_tile_source_options_default(void)
mln_style_raster_dem_encoding
Definition style.h:63
mln_style_image_info mln_style_image_info_default(void)
mln_status mln_style_id_list_get(const mln_style_id_list *list, size_t index, mln_string_view *out_id)
mln_status mln_map_get_layer_filter(mln_map *map, mln_string_view layer_id, mln_json_snapshot **out_filter)
mln_status mln_style_id_list_count(const mln_style_id_list *list, size_t *out_count)
mln_custom_geometry_source_option_field
Definition style.h:69
mln_status mln_map_add_raster_source_tiles(mln_map *map, mln_string_view source_id, const mln_string_view *tiles, size_t tile_count, const mln_style_tile_source_options *options)
mln_status mln_map_add_raster_dem_source_url(mln_map *map, mln_string_view source_id, mln_string_view url, const mln_style_tile_source_options *options)
mln_status mln_map_invalidate_custom_geometry_source_tile(mln_map *map, mln_string_view source_id, mln_canonical_tile_id tile_id)
mln_location_indicator_image_kind
Definition style.h:86
mln_status mln_map_set_image_source_coordinates(mln_map *map, mln_string_view source_id, const mln_lat_lng *coordinates, size_t coordinate_count)
mln_status mln_map_set_custom_geometry_source_tile_data(mln_map *map, mln_string_view source_id, mln_canonical_tile_id tile_id, const mln_geojson *data)
mln_status mln_map_add_style_source_json(mln_map *map, mln_string_view source_id, const mln_json_value *source_json)
mln_status mln_map_add_style_layer_json(mln_map *map, const mln_json_value *layer_json, mln_string_view before_layer_id)
mln_status mln_map_add_image_source_image(mln_map *map, mln_string_view source_id, const mln_lat_lng *coordinates, size_t coordinate_count, const mln_premultiplied_rgba8_image *image)
void(* mln_custom_geometry_source_tile_callback)(void *user_data, mln_canonical_tile_id tile_id)
Definition style.h:131