|
MapLibre Native C API
Public C ABI for the MapLibre Native wrapper.
|
Go to the source code of this file.
Public C API declarations for map camera and coordinate conversion.
| mln_animation_options mln_animation_options_default | ( | void | ) |
Returns empty animation options initialized for this C API version.
| mln_bound_options mln_bound_options_default | ( | void | ) |
Returns empty map bound options initialized for this C API version.
| mln_camera_fit_options mln_camera_fit_options_default | ( | void | ) |
Returns empty camera fitting options initialized for this C API version.
| mln_camera_options mln_camera_options_default | ( | void | ) |
Returns empty camera options initialized for this C API version.
| mln_free_camera_options mln_free_camera_options_default | ( | void | ) |
Returns empty free camera options initialized for this C API version.
| mln_status mln_map_camera_for_geometry | ( | mln_map * | map, |
| const mln_geometry * | geometry, | ||
| const mln_camera_fit_options * | fit_options, | ||
| mln_camera_options * | out_camera ) |
Computes a camera that fits a geometry in the current viewport.
The geometry descriptor graph is borrowed for the duration of this call and is not retained. Empty geometry objects and geometry collections with no coordinates are invalid for camera fitting. Passing null fit_options uses zero padding with no bearing or pitch override. On success, *out_camera is overwritten.
Returns:
| mln_status mln_map_camera_for_lat_lng_bounds | ( | mln_map * | map, |
| mln_lat_lng_bounds | bounds, | ||
| const mln_camera_fit_options * | fit_options, | ||
| mln_camera_options * | out_camera ) |
Computes a camera that fits geographic bounds in the current viewport.
Passing null fit_options uses zero padding with no bearing or pitch override. On success, *out_camera is overwritten.
Returns:
| mln_status mln_map_camera_for_lat_lngs | ( | mln_map * | map, |
| const mln_lat_lng * | coordinates, | ||
| size_t | coordinate_count, | ||
| const mln_camera_fit_options * | fit_options, | ||
| mln_camera_options * | out_camera ) |
Computes a camera that fits geographic coordinates in the current viewport.
The coordinates array is borrowed for the duration of this call and is not retained. Passing null fit_options uses zero padding with no bearing or pitch override. On success, *out_camera is overwritten.
Returns:
| mln_status mln_map_cancel_transitions | ( | mln_map * | map | ) |
Cancels active camera transitions.
Returns:
| mln_status mln_map_dump_debug_logs | ( | mln_map * | map | ) |
Dumps map debug logs through MapLibre Native logging.
Returns:
| mln_status mln_map_ease_to | ( | mln_map * | map, |
| const mln_camera_options * | camera, | ||
| const mln_animation_options * | animation ) |
Applies a camera ease transition command.
Only fields indicated by camera->fields affect the map. Passing a null animation uses MapLibre Native's default animation options.
Returns:
| mln_status mln_map_fly_to | ( | mln_map * | map, |
| const mln_camera_options * | camera, | ||
| const mln_animation_options * | animation ) |
Applies a camera fly transition command.
Only fields indicated by camera->fields affect the map. Passing a null animation uses MapLibre Native's default animation options.
Returns:
| mln_status mln_map_get_bounds | ( | mln_map * | map, |
| mln_bound_options * | out_options ) |
Copies map camera constraint options.
On success, *out_options is overwritten and all known fields are marked.
Returns:
| mln_status mln_map_get_camera | ( | mln_map * | map, |
| mln_camera_options * | out_camera ) |
Copies the current camera snapshot.
On success, *out_camera is overwritten.
Returns:
| mln_status mln_map_get_debug_options | ( | mln_map * | map, |
| uint32_t * | out_options ) |
Copies the current MapLibre debug overlay mask bits.
Returns:
| mln_status mln_map_get_free_camera_options | ( | mln_map * | map, |
| mln_free_camera_options * | out_options ) |
Copies the current free camera position and orientation.
On success, *out_options is overwritten.
Returns:
| mln_status mln_map_get_projection_mode | ( | mln_map * | map, |
| mln_projection_mode * | out_mode ) |
Copies the current axonometric rendering options.
On success, *out_mode is overwritten. MapLibre currently reports all fields.
Returns:
| mln_status mln_map_get_rendering_stats_view_enabled | ( | mln_map * | map, |
| bool * | out_enabled ) |
Copies whether MapLibre's rendering stats overlay view is enabled.
Returns:
| mln_status mln_map_get_tile_options | ( | mln_map * | map, |
| mln_map_tile_options * | out_options ) |
Copies tile prefetch and LOD tuning controls.
On success, *out_options is overwritten and all known fields are marked.
Returns:
| mln_status mln_map_get_viewport_options | ( | mln_map * | map, |
| mln_map_viewport_options * | out_options ) |
Copies live map viewport and render-transform controls.
On success, *out_options is overwritten and all known fields are marked.
Returns:
| mln_status mln_map_is_fully_loaded | ( | mln_map * | map, |
| bool * | out_loaded ) |
Copies whether MapLibre currently considers the map fully loaded.
Returns:
| mln_status mln_map_jump_to | ( | mln_map * | map, |
| const mln_camera_options * | camera ) |
Applies a camera jump command.
Only fields indicated by camera->fields affect the map.
Returns:
| mln_status mln_map_lat_lng_bounds_for_camera | ( | mln_map * | map, |
| const mln_camera_options * | camera, | ||
| mln_lat_lng_bounds * | out_bounds ) |
Computes wrapped geographic bounds for a camera in the current viewport.
Returns:
| mln_status mln_map_lat_lng_bounds_for_camera_unwrapped | ( | mln_map * | map, |
| const mln_camera_options * | camera, | ||
| mln_lat_lng_bounds * | out_bounds ) |
Computes unwrapped geographic bounds for a camera in the current viewport.
Returns:
| mln_status mln_map_lat_lng_for_pixel | ( | mln_map * | map, |
| mln_screen_point | point, | ||
| mln_lat_lng * | out_coordinate ) |
Converts a screen point to a geographic world coordinate for the current map.
The input point uses logical map pixels with an origin at the top-left of the map viewport.
Returns:
| mln_status mln_map_lat_lngs_for_pixels | ( | mln_map * | map, |
| const mln_screen_point * | points, | ||
| size_t | point_count, | ||
| mln_lat_lng * | out_coordinates ) |
Converts screen points to geographic world coordinates for the current map.
The caller owns both arrays. On success, out_coordinates receives point_count entries. points and out_coordinates may be null only when point_count is 0.
Returns:
| mln_status mln_map_move_by | ( | mln_map * | map, |
| double | delta_x, | ||
| double | delta_y ) |
Applies a screen-space pan command.
Returns:
| mln_status mln_map_move_by_animated | ( | mln_map * | map, |
| double | delta_x, | ||
| double | delta_y, | ||
| const mln_animation_options * | animation ) |
Applies an animated screen-space pan command.
Passing a null animation uses MapLibre Native's default animation options.
Returns:
| mln_status mln_map_pitch_by | ( | mln_map * | map, |
| double | pitch ) |
Applies a pitch delta command.
Returns:
| mln_status mln_map_pitch_by_animated | ( | mln_map * | map, |
| double | pitch, | ||
| const mln_animation_options * | animation ) |
Applies an animated pitch delta command.
Passing a null animation uses MapLibre Native's default animation options.
Returns:
| mln_status mln_map_pixel_for_lat_lng | ( | mln_map * | map, |
| mln_lat_lng | coordinate, | ||
| mln_screen_point * | out_point ) |
Converts a geographic world coordinate to a screen point for the current map.
The output point uses logical map pixels with an origin at the top-left of the map viewport.
Returns:
| mln_status mln_map_pixels_for_lat_lngs | ( | mln_map * | map, |
| const mln_lat_lng * | coordinates, | ||
| size_t | coordinate_count, | ||
| mln_screen_point * | out_points ) |
Converts geographic world coordinates to screen points for the current map.
The caller owns both arrays. On success, out_points receives coordinate_count entries. coordinates and out_points may be null only when coordinate_count is 0.
Returns:
| mln_status mln_map_rotate_by | ( | mln_map * | map, |
| mln_screen_point | first, | ||
| mln_screen_point | second ) |
Applies a screen-space rotate command.
Returns:
| mln_status mln_map_rotate_by_animated | ( | mln_map * | map, |
| mln_screen_point | first, | ||
| mln_screen_point | second, | ||
| const mln_animation_options * | animation ) |
Applies an animated screen-space rotate command.
Passing a null animation uses MapLibre Native's default animation options.
Returns:
| mln_status mln_map_scale_by | ( | mln_map * | map, |
| double | scale, | ||
| const mln_screen_point * | anchor ) |
Applies a screen-space zoom command.
Passing a null anchor uses MapLibre Native's default zoom anchor.
Returns:
| mln_status mln_map_scale_by_animated | ( | mln_map * | map, |
| double | scale, | ||
| const mln_screen_point * | anchor, | ||
| const mln_animation_options * | animation ) |
Applies an animated screen-space zoom command.
Passing a null anchor uses MapLibre Native's default zoom anchor. Passing a null animation uses MapLibre Native's default animation options.
Returns:
| mln_status mln_map_set_bounds | ( | mln_map * | map, |
| const mln_bound_options * | options ) |
Applies selected map camera constraint options.
Only fields indicated by options->fields affect the map.
Returns:
| mln_status mln_map_set_debug_options | ( | mln_map * | map, |
| uint32_t | options ) |
Applies MapLibre debug overlay mask bits to a map.
Pass 0 to disable all debug overlays.
Returns:
| mln_status mln_map_set_free_camera_options | ( | mln_map * | map, |
| const mln_free_camera_options * | options ) |
Applies selected free camera position and orientation fields.
Position uses MapLibre Native's modified Web Mercator camera space. Orientation is a quaternion stored as x, y, z, w. Only fields indicated by options->fields affect the map.
Returns:
| mln_status mln_map_set_projection_mode | ( | mln_map * | map, |
| const mln_projection_mode * | mode ) |
Applies axonometric rendering option fields to a map.
Only fields indicated by mode->fields affect the map. Unspecified fields keep their current native values. These options mutate the live map render transform and do not change coordinate conversion units or formulas.
Returns:
| mln_status mln_map_set_rendering_stats_view_enabled | ( | mln_map * | map, |
| bool | enabled ) |
Enables or disables MapLibre's rendering stats overlay view.
Returns:
| mln_status mln_map_set_tile_options | ( | mln_map * | map, |
| const mln_map_tile_options * | options ) |
Applies selected tile prefetch and LOD tuning controls.
Only fields indicated by options->fields affect the map.
Returns:
| mln_status mln_map_set_viewport_options | ( | mln_map * | map, |
| const mln_map_viewport_options * | options ) |
Applies selected live map viewport and render-transform controls.
Only fields indicated by options->fields affect the map.
Returns:
| mln_map_tile_options mln_map_tile_options_default | ( | void | ) |
Returns empty tile tuning options initialized for this C API version.
| mln_map_viewport_options mln_map_viewport_options_default | ( | void | ) |
Returns empty viewport options initialized for this C API version.
| mln_projection_mode mln_projection_mode_default | ( | void | ) |
Returns empty axonometric rendering options initialized for this C API version.