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. QML Map Debugging
Forum Updated to NodeBB v4.3 + New Features

QML Map Debugging

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 524 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.
  • J Offline
    J Offline
    j_omega
    wrote on last edited by
    #1

    I have made some small modifications to the minimal_map demo to allow it to use offline tiles. It works perfectly on my desktop, but when I run it on my embedded target, it only loads a blank gray screen. I assume that I am probably missing a required component on the embedded target. It has the QLocaiton module as well as the OSM plugin. The only error message that I get is qrc:/main.qml:87:24: Unable to assign [undefined] to QDeclarativeGeoMapType*. This is because on the embedded target, supportedMapTypes.length returns 0. Can someone recommend some ideas on how to debug this. It is difficult with only this error message.

    import QtQuick 2.0
    import QtQuick.Window 2.0
    import QtLocation 5.6
    import QtPositioning 5.6
    
    Window {
        width: 800
        height: 480
        visible: true
    
        Plugin {
            id: mapPlugin
            name: "osm"
    
            PluginParameter {
                name: "osm.mapping.custom.host"
                value: "file:///usr/bin/resources/maptiles/"
            }
            PluginParameter {
                name: "osm.mapping.providersrepository.disabled"
                value: true
            }
            PluginParameter {
                name: "osm.mapping.cache.directory"
                value: "/home/asdf/Documents/cache"
            }
    
            Component.onCompleted: {
                console.log("Plugin loaded")
            }
        }
    
        Map {
            anchors.fill: parent
            plugin: mapPlugin
            zoomLevel: 7
            activeMapType: supportedMapTypes[supportedMapTypes.length - 1]
    
            Component.onCompleted: {
                for( var i = 0; i < supportedMapTypes.length; i++) {
                    console.log(supportedMapTypes[i].name)
                }
    
                console.log("Map loaded")
            }
        }
    }
    
    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