Important: Please read the Qt Code of Conduct -

How to get OSM plugin to exclusively use offline tiles and not fetch anything from the Server ?

  • I have been playing around with the OSM plugin . I have some custom tiles in my offline directory.
    I would like the OSM plugin to only use my offline tiles without fetching anything from the server .
    So if you are in a place without any offline tiles available the screen should stay black.
    So far my code works in that it uses my offline tiles , but still fetches missing tiles from the server.
    Is it possible to disable the server altogether or do I have to create a custom server ?

    import QtQuick 2.8
    import QtLocation 5.8
    import QtPositioning 5.8
    Item {
    id: mapItem
    anchors.fill: parent
        anchors.fill: parent
        Plugin {
            id: mapPlugin
            name: "osm"
            //Offline directory for Map Tiles
            PluginParameter {
                name: ''
                value: ':/GPSTracks/'
            //Disable to Fetch Map Data from the Server
            PluginParameter {
               name: "osm.mapping.providersrepository.disabled"
               value: true
        Map {
            id: map
            anchors.fill: parent
            plugin: mapPlugin
            zoomLevel: 16
            activeMapType: map.supportedMapTypes[1]
            copyrightsVisible : false
            gesture.enabled: true
            tilt: 0
            color: "black"

  • Try it offline, this way it wont go online and fetch tiles.. just a thought. lets see if you get any errors.

Log in to reply