Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Map Viewer no longer work
Forum Updated to NodeBB v4.3 + New Features

Map Viewer no longer work

Scheduled Pinned Locked Moved Solved QML and Qt Quick
8 Posts 4 Posters 1.7k Views 2 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.
  • V Offline
    V Offline
    Virion
    wrote on last edited by
    #1

    I have been using Qt Quick's map viewer (OSM) feature on android for some time now. It used to work but for some reason it no longer display anything now (empty map) on android, but somehow works on desktop.

    So I decided to create a new Qt Quick project and wrote a minimal map viewer to see if it work:

    import QtQuick 2.0
    import QtQuick.Window 2.0
    import QtLocation 5.6
    import QtPositioning 5.6
    
    Window {
        visible: true
        width: 640
        height: 480
        title: qsTr("Hello World")
    
        Plugin {
                id: mapPlugin
                name: "osm"
            }
    
        Map {
            anchors.fill: parent
            plugin: mapPlugin
            center: QtPositioning.coordinate(59.91, 10.75)
            zoomLevel: 14
        }
    }
    

    This, too, doesnt work on android. It works on desktop but not android. I can see the OSM copyright text but the map is empty. Any idea?

    K 1 Reply Last reply
    0
    • V Virion

      I have been using Qt Quick's map viewer (OSM) feature on android for some time now. It used to work but for some reason it no longer display anything now (empty map) on android, but somehow works on desktop.

      So I decided to create a new Qt Quick project and wrote a minimal map viewer to see if it work:

      import QtQuick 2.0
      import QtQuick.Window 2.0
      import QtLocation 5.6
      import QtPositioning 5.6
      
      Window {
          visible: true
          width: 640
          height: 480
          title: qsTr("Hello World")
      
          Plugin {
                  id: mapPlugin
                  name: "osm"
              }
      
          Map {
              anchors.fill: parent
              plugin: mapPlugin
              center: QtPositioning.coordinate(59.91, 10.75)
              zoomLevel: 14
          }
      }
      

      This, too, doesnt work on android. It works on desktop but not android. I can see the OSM copyright text but the map is empty. Any idea?

      K Offline
      K Offline
      koahnig
      wrote on last edited by
      #2

      @Virion

      Hi and welcome to devnet forum

      What did change for your Android setup is the key question?
      You are the only one being able to answer.

      Change of Android on device or different device?
      Change of Qt version?

      Anything else is crystal ball reading.

      Vote the answer(s) that helped you to solve your issue(s)

      V 1 Reply Last reply
      0
      • K koahnig

        @Virion

        Hi and welcome to devnet forum

        What did change for your Android setup is the key question?
        You are the only one being able to answer.

        Change of Android on device or different device?
        Change of Qt version?

        Anything else is crystal ball reading.

        V Offline
        V Offline
        Virion
        wrote on last edited by
        #3

        @koahnig nothing changed. Our users just complained the app suddenly doesn't show the map. We never updated the app for few months so should have nothing changed. Qt 5.10 by the way. I also tried other versions 5.11, 5.12 but still the same.

        1 Reply Last reply
        0
        • V Offline
          V Offline
          Virion
          wrote on last edited by
          #4

          Update: Seems like it works on my older android 6.0 phone, but not android 8.0. Not sure what happened there, I can only see the copyright text and marker but a blank map on android 8.0.

          1 Reply Last reply
          0
          • V Offline
            V Offline
            Virion
            wrote on last edited by
            #5

            After some debugging, it seems to be related to SSL:

            QGeoTileRequestManager: Failed to fetch tile (210,123,8) 5 times, giving up. Last error message was: 'Error creating SSL context ()'

            If I remember correctly, Qt android doesn't come with SSL am I correct?

            sierdzioS 1 Reply Last reply
            0
            • V Virion

              After some debugging, it seems to be related to SSL:

              QGeoTileRequestManager: Failed to fetch tile (210,123,8) 5 times, giving up. Last error message was: 'Error creating SSL context ()'

              If I remember correctly, Qt android doesn't come with SSL am I correct?

              sierdzioS Offline
              sierdzioS Offline
              sierdzio
              Moderators
              wrote on last edited by
              #6

              @Virion said in Map Viewer no longer work:

              If I remember correctly, Qt android doesn't come with SSL am I correct?

              Correct. Qt never ships with prebuilt OpenSSL due to law restrictions.

              (Z(:^

              1 Reply Last reply
              0
              • V Offline
                V Offline
                Virion
                wrote on last edited by
                #7

                Problem fixed. I just built my own OpenSSL and added both libcrypto.so and libssl.so to my "Additional Libraries" option under "Build Android APK" step.

                Hope this post helps any other people who faced similar problem. Thanks.

                1 Reply Last reply
                3
                • oscarcookO Offline
                  oscarcookO Offline
                  oscarcook
                  Banned
                  wrote on last edited by
                  #8
                  This post is deleted!
                  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