How maplibre/maplibre-native-qt works
MapLibre Native Qt provides Qt/C++ map bindings, a Qt Location provider, QML/Qt Quick integration, and Widgets support. The main workflow is configuring map settings and styles, creating a map through a Qt-facing entry point, then rendering it through a platform graphics backend; callers can also change style layers and camera state. The graph includes style and GeoJSON support as distinct capabilities. Several implementation files were not sampled, so unverified backend and Widgets connections are omitted or marked dashed.
Main entry points: texture_node_base.cpp Texture Node · layer_style_change.cpp Style Changes · map.cpp Map Engine · map_quick_item.cpp QML Map Item
Components 24
Map Core
- Map Settings
src/core/settings.cpp - Map Engine
src/core/map.cpp - Map Observer
src/core/map_observer.cpp - GeoJSON Support
src/core/geojson.cpp
Style Data
- Style Parameters
src/core/style/style_parameter.cpp - Layer Parameters
src/core/style/layer_parameter.cpp - Filter Parameters
src/core/style/filter_parameter.cpp - Style Changes
src/core/style/layer_style_change.cpp
Qt Location
- Location Provider
src/location/plugins/qgeoserviceproviderplugin.cpp - Mapping Engine
src/location/qt_mapping_engine.cpp - Location Map
src/location/qgeomap.cpp - Declarative Styles
src/location/plugins/declarative_style.cpp
Qt Quick
- QML Map Item
src/quick/plugins/map_quick_item.cpp - Texture Node
src/quick/texture_node_base.cpp - Quick Style API
src/quick/plugins/map_quick_style.cpp - Quick OpenGL Node
src/quick/texture_node_opengl.cpp - Quick Vulkan Node
src/quick/texture_node_vulkan.cpp - Quick Metal Node
src/quick/texture_node_metal_p.hpp
Rendering Backends
- Map Renderer
src/core/map_renderer.cpp - OpenGL Backend
src/core/rendering/opengl_renderer_backend.cpp - Vulkan Backend
src/core/rendering/vulkan_renderer_backend.cpp - Metal Backend
src/core/rendering/metal_renderer_backend_p.hpp
Other components
- Qt Application
- Map Widget
src/widgets/map_widget.cpp
Connections 22
- Qt Application → Location Provider: requests mapping
src/location/plugins/qgeoserviceproviderplugin.cpp - Location Provider → Mapping Engine: creates engine
src/location/plugins/qgeoserviceproviderplugin.cpp - Mapping Engine → Location Map: creates map
- Mapping Engine → Map Settings: configures
src/location/qt_mapping_engine.cpp - Location Map → Texture Node: creates node
src/location/qgeomap.cpp - Location Map → Style Changes: uses changes
src/location/qgeomap.cpp - Declarative Styles → Style Parameters: configures
src/location/plugins/declarative_style.cpp - QML Map Item → Texture Node: creates node
src/quick/plugins/map_quick_item.cpp - QML Map Item → Map Engine: controls map
src/quick/plugins/map_quick_item.cpp - QML Map Item → Style Changes: applies changes
src/quick/plugins/map_quick_item.cpp - Texture Node → Map Engine: owns map
- Style Changes → Map Engine: updates style
src/core/style/layer_style_change.cpp - Style Changes → Layer Parameters: reads parameters
src/core/style/layer_style_change.cpp - Style Changes → Filter Parameters: reads parameters
src/core/style/layer_style_change.cpp - Map Engine → Map Settings: reads settings
src/core/map.cpp - Map Engine → Map Observer: notifies
src/core/map.cpp - Map Renderer → OpenGL Backend: dispatches
- Map Renderer → Vulkan Backend: dispatches
- Map Renderer → Metal Backend: dispatches
- Quick OpenGL Node → Texture Node: extends
- Quick Vulkan Node → Texture Node: extends
- Quick Metal Node → Texture Node: extends
src/quick/texture_node_metal_p.hpp