0

I'm trying to load a mapbox in my c++/qt application. On my PC the application is working fine, and the map is loaded. However, when the application is deployed on the raspberry(v3) the application is running but the map is not loaded(a blank screen appears).

I've tried a different map plugins such as esri and they work fine on the raspberry. But the mapbox plugin wont work

Here is the code I'm working on

import QtQuick 2.0
import QtQuick.Window 2.0
import QtLocation 5.6
import QtPositioning 5.6

Window {
    width: 512
    height: 512
    visible: true

    Plugin {
        id: mapPlugin
        name: "mapboxgl" // "mapboxgl", "esri", ...
        // specify plugin parameters if necessary
        // PluginParameter {
        //     name:
        //     value:
        // }
    }

    Map {
        anchors.fill: parent
        plugin: mapPlugin
        center: QtPositioning.coordinate(41.38, 2.16) // Oslo
        zoomLevel: 14
    }
}

And the C++ code

 QQmlApplicationEngine engine;
    engine.load(QUrl(QStringLiteral("qrc:/main.qml")));

I'm expecting a mapbox type map to be loaded but only a blank screen appears. There are no any error messages. I think it's because a plugin is missing or something. But then why it is working on my laptop since I have the same version of QT in both machines: (QT 5.10)

Pa_
  • 641
  • 1
  • 5
  • 17
  • 1
    It might be an openssl-dependency problem. Make sure you have that one in your system – Pa_ May 31 '19 at 16:03
  • Does the Raspberry Pi you are running the project on have support for WebGL? You'll need to refer to the specs for your specific device to know for sure. If it does not, then this is most likely the cause of the blank screen you are seeing. It might also be the case that you need to enable OpenGL support on your Pi: https://raspberrypi.stackexchange.com/a/83934 – riastrad Jun 04 '19 at 19:21

0 Answers0