Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. minimal mapboxgl application does not show map
Forum Updated to NodeBB v4.3 + New Features

minimal mapboxgl application does not show map

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 4 Posters 911 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Amir Reza Sadeghi
    wrote on last edited by
    #1

    Hi there

    I want to use mapboxgl plugin in my educational app and just for testing how it works, I have created a Qt Quick application in the QtCreator using Qt 5.15. The main qml file is as below:

    import QtQuick 2.15
    import QtQuick.Window 2.15
    import QtLocation 5.15
    import QtPositioning 5.15
    
    Window {
        width: 640
        height: 480
        visible: true
        title: qsTr("Hello World")
        Map {
                id: map
                anchors.fill: parent
    
                plugin: Plugin {
                    name: "mapboxgl"
    
                    PluginParameter {
                        name: "mapboxgl.mapping.items.insert_before"
                        value: "road-label-small"
                    }
    
                    PluginParameter {
                        name: "mapboxgl.access_token"
                        value: "pk.eyJ1IjoiYW1pci1yZXphLXNhZGVnaGkiLCJhIjoiY2xhM3J5Nm5uMHQyYzN0bXp4eWxkamdsayJ9.0s-SuB1jKl5RAuRMox88Mg"
                    }
    
                }
    
            }
    
    }
    
    

    When I run this code, the application window opens but nothing appears on it. in the output terminal, below messages are printed:

    Threaded rendering is not optimal in the Mapbox GL plugin.
    qt.network.ssl: QSslSocket: cannot resolve EVP_PKEY_base_id
    qt.network.ssl: QSslSocket: cannot resolve SSL_get_peer_certificate
    qt.network.ssl: QSslSocket: cannot call unresolved function SSL_get_peer_certificate
    [ ERROR ]  "{QSGRenderThread}[Setup]: loading style failed: SSL handshake failed"
    qt.network.ssl: QSslSocket: cannot call unresolved function SSL_get_peer_certificate
    [ ERROR ]  "{QSGRenderThread}[Setup]: loading style failed: SSL handshake failed"
    qt.network.ssl: QSslSocket: cannot call unresolved function SSL_get_peer_certificate
    [ ERROR ]  "{QSGRenderThread}[Setup]: loading style failed: SSL handshake failed"
    qt.network.ssl: QSslSocket: cannot call unresolved function SSL_get_peer_certificate
    [ ERROR ]  "{QSGRenderThread}[Setup]: loading style failed: SSL handshake failed"
    qt.network.ssl: QSslSocket: cannot call unresolved function SSL_get_peer_certificate
    [ ERROR ]  "{QSGRenderThread}[Setup]: loading style failed: SSL handshake failed"
    

    I use Ubuntu 22.04 lts and also installed openssl using:

    sudo apt-get install openssl
    

    but it did not help me.

    Does anyone know how to solve this problem?
    Thanks for your helps
    sincerely
    Amir Reza Sadeghi

    1 Reply Last reply
    0
    • B Offline
      B Offline
      berkayozkarhan
      wrote on last edited by
      #2

      The reason is that openssl is not installed in your system. Go to https://github.com/openssl/openssl and follow download and build instructions. After installation add this line to your .pro file.

      LIBS += -L{path_of_installation} -llibssl.so
      LIBS += -L{path_of_installation} -llibcrypto.so

      In unix and similar systems, the install path will be as follows by default

      --> /usr/local

      so if you are using linux and installed openssl by default settings, add this lines to your .pro file

      LIBS += -L/usr/local/lib/ -llibssl.so
      LIBS += -L/usr/local/lib/ -llibcrypto.so

      B 1 Reply Last reply
      0
      • B berkayozkarhan

        The reason is that openssl is not installed in your system. Go to https://github.com/openssl/openssl and follow download and build instructions. After installation add this line to your .pro file.

        LIBS += -L{path_of_installation} -llibssl.so
        LIBS += -L{path_of_installation} -llibcrypto.so

        In unix and similar systems, the install path will be as follows by default

        --> /usr/local

        so if you are using linux and installed openssl by default settings, add this lines to your .pro file

        LIBS += -L/usr/local/lib/ -llibssl.so
        LIBS += -L/usr/local/lib/ -llibcrypto.so

        B Offline
        B Offline
        berkayozkarhan
        wrote on last edited by
        #3

        @berkayozkarhan Edit : you can also install OpenSSL by MaintenanceTool.

        X 1 Reply Last reply
        0
        • B berkayozkarhan

          @berkayozkarhan Edit : you can also install OpenSSL by MaintenanceTool.

          X Offline
          X Offline
          xu__d
          wrote on last edited by
          #4

          @berkayozkarhan I installed it, but the error is still reported.

          1 Reply Last reply
          0
          • Ronel_qtmasterR Offline
            Ronel_qtmasterR Offline
            Ronel_qtmaster
            wrote on last edited by
            #5

            You can ignore ssl errors and go ahead

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved