
MapLibre Native Qt provides comprehensive Qt bindings for MapLibre Native, including QML components and C++ APIs. It supports both Qt Quick and Qt Widgets applications with full MapLibre functionality.
Quick start
find_package(QMapLibre COMPONENTS Location REQUIRED)
target_link_libraries(
MyApplication
PRIVATE
QMapLibre::Location
)
qmaplibre_location_setup_plugins(MyApplication)import QtQuick 6.5
import QtQuick.Window 6.5
import QtLocation 6.5
import QtPositioning 6.5
Window {
width: 512
height: 512
visible: true
Plugin {
id: mapPlugin
name: "maplibre"
PluginParameter {
name: "maplibre.map.styles"
value: "https://tiles.openfreemap.org/styles/liberty"
}
}
MapView {
anchors.fill: parent
map.plugin: mapPlugin
map.center: QtPositioning.coordinate(41.874, -75.789)
map.zoomLevel: 5
}
}›Setup noteschecked with v3.0.0
Needs Qt 6.5 or newer with the Qt Location module. Prebuilt archives for each Qt version and platform are on the GitHub releases page; point CMAKE_PREFIX_PATH or QMapLibre_DIR at the unpacked files. The QML path supports only the OpenGL backend, so the official example calls QQuickWindow::setGraphicsApi(QSGRendererInterface::OpenGLRhi) before creating the app. The main branch is an unreleased 4.0 whose API may still change.
Other platforms are on SDKs.
