I am currently working on a Qt application where we need to load the planet map for full offline usage. I started using Qt Location Mapbox GL Plugin to play around with the map and everything works fine when the internet connection is present.
But according to our product requirements the internet connection will be extremely limited and most of times we will not have internet connection at all. So, we need to have a completely offline usage of mapboxgl in our Qt application. Is there any way to do that by setting some parameters of Mapbox GL Plugin that I have missed? Is it possible by exporting offline tiles from official mapbox offline tool and stored them in a database?
Other suggestions or ideas on how to use an offline map in Qt are also welcome.
A link with all Qt Location Mapbox GL Plugin parameters.
https://doc.qt.io/qt-5/location-plugin-mapboxgl.html
Below you can find a basic example of using a mapbox map in Qt and Qml.
import QtQuick 2.0
import QtQuick.Window 2.14
import QtLocation 5.6
import QtPositioning 5.6
Window {
width: Qt.platform.os == "android" ? Screen.width : 512
height: Qt.platform.os == "android" ? Screen.height : 512
visible: true
Plugin {
id: mapPlugin
name: "mapboxgl"
}
Map {
anchors.fill: parent
plugin: mapPlugin
center: QtPositioning.coordinate(59.91, 10.75) // Oslo
zoomLevel: 14
}
}