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. Unable to assign [undefined] to QDeclarativeGeoMapType*
Forum Updated to NodeBB v4.3 + New Features

Unable to assign [undefined] to QDeclarativeGeoMapType*

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
4 Posts 3 Posters 966 Views
  • 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.
  • JamshidJ Offline
    JamshidJ Offline
    Jamshid
    wrote on last edited by
    #1

    Hi,
    when I want to open my application that uses "osm" map, qtcreator throws this error (and also I have made a run able file on Linux using linuxdeployqt and the result is the same) .
    Do you know what I'm missing?

    here is the code:

    import QtQuick 2.7
    import QtQuick.Window 2.2
    import QtLocation 5.8
    import QtPositioning 5.0
    
    Window {
        id: win
        objectName: "window"
        visible: true
        width: 512
        height: 512
    
        Map {
            id: map
            anchors.fill: parent
            activeMapType: map.supportedMapTypes[8]
            zoomLevel: 1
            plugin: Plugin {
                name: 'osm';
                PluginParameter {
                    name: 'osm.mapping.offline.directory'
                    value: ':/offline_tiles/'
                }
            }
        }
    }
    
    
    1 Reply Last reply
    0
    • GrecKoG Offline
      GrecKoG Offline
      GrecKo
      Qt Champions 2018
      wrote on last edited by
      #2

      Are you sure map.supportedMapTypes has at least 9 elements?

      1 Reply Last reply
      0
      • JamshidJ Offline
        JamshidJ Offline
        Jamshid
        wrote on last edited by
        #3

        https://qt-blog-uploads.s3.amazonaws.com/wp-content/uploads/2017/05/OsmOffline.zip
        I want to make an executable file from this example for test.
        In it the map.supportedMapTypes is equal to 1. but I have tried all possible things.
        https://doc.qt.io/qt-5/qml-qtlocation-maptype.html
        here we can see the map types also. but I want to use the offline map and deploy may app to the customer.

        1 Reply Last reply
        0
        • I Offline
          I Offline
          Ifb_hakan
          wrote on last edited by
          #4

          Hi @Jamshid did you solved the Problem already? I have the same issue.

          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