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

#include <map.h>

Data Fields

uint32_t width
 
uint32_t height
 
double scale_factor
 
uint32_t map_mode
 

Detailed Description

Options used when creating a map.

Field Documentation

◆ height

uint32_t mln_map_options::height

Initial logical map height in UI pixels. See width.

◆ map_mode

uint32_t mln_map_options::map_mode

One of mln_map_mode. Defaults to MLN_MAP_MODE_CONTINUOUS.

◆ scale_factor

double mln_map_options::scale_factor

UI-to-device pixel scale. Must be positive and finite.

Unlike width and height, this is fixed for the lifetime of the map and selects sprites, glyphs, and raster tiles for every frame the map renders. Render targets carry their own scale factor for geometry and shaders, so create the map with the scale factor you intend to render at. A render session attached or resized with a different scale factor logs a warning and renders styled imagery chosen for the map's density.

◆ width

uint32_t mln_map_options::width

Initial logical map width in UI pixels. Must be positive.

Attaching a render session replaces this with the render target extent, and mln_render_session_resize() replaces it again. Until the first attach it is the viewport that camera and projection queries such as mln_map_camera_for_lat_lng_bounds() and mln_map_pixel_for_lat_lng() are answered against.


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