Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. mapviewer example change map provider

mapviewer example change map provider

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 559 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.
  • H Offline
    H Offline
    h20delirious
    wrote on last edited by
    #1

    Hi,
    I have been exploring the map viewer example in qt 5.7 examples but on running it i find that i need to change the mapprovider to either mapbox or here. In order to do so i have obtained my mapbox.map id and mapbox.access_token. I have found out that in order to implement the mapbox provider I need to write this particular piece of code
    Plugin {
    id: myPlugin
    name: "mapbox"
    PluginParameter {
    name: "mapbox.access_token"; value: "my access_token"
    }
    PluginParameter {
    name: "mapbox.map_id"; value: "my map id"
    }
    }
    but i dont know in which particular file of the mapviewer example shud i b writing these lines of code mentioned above.
    Pleases help i have been exploring the net over for the ans for quite some time now but i am unable to find one, cuz most of them say to refer to qt's official documentation which i am not able to understand

    Please help a pin point answer would be highly obliged.
    Thanks

    1 Reply Last reply
    0
    • L Offline
      L Offline
      ldanzinger
      wrote on last edited by
      #2

      In the mapviewer.qml file, you can see a getPlugins() function that does this code dynamically instead of declaratively. You could add in your token and IDs here.

      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