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. How to get OSM plugin to exclusively use offline tiles and not fetch anything from the Server ?
Forum Updated to NodeBB v4.3 + New Features

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

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
2 Posts 2 Posters 432 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.
  • M Offline
    M Offline
    Markus Ippy
    wrote on last edited by
    #1

    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
    Rectangle{
        anchors.fill: parent
        Plugin {
            id: mapPlugin
            name: "osm"
            //Offline directory for Map Tiles
            PluginParameter {
                name: 'osm.mapping.offline.directory'
                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
            center: 
           QtPositioning.coordinate(-26.074278,28.752637)
            zoomLevel: 16
            activeMapType: map.supportedMapTypes[1]
            copyrightsVisible : false
            gesture.enabled: true
            tilt: 0
            color: "black"
    
        }
      }
    }
    
    1 Reply Last reply
    0
    • L Offline
      L Offline
      Leaderaa
      wrote on last edited by
      #2

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

      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