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. What am I doing wrong with Map()
Forum Updated to NodeBB v4.3 + New Features

What am I doing wrong with Map()

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

    Hello,

    I just want to add some MapTypes to my osm like the example shown on QtCreator but I am unable to do it.

    Map{
    id: map
    anchors.fill: parent
    plugin: Plugin{name: "osm"}
    activeMapType: MapType.TerrainMap

    This is what I am doing, the activeMapType always shows up an error.
    Thank you in advance,
    Vince

    jsulmJ 1 Reply Last reply
    0
    • V Vince94cat

      Hello,

      I just want to add some MapTypes to my osm like the example shown on QtCreator but I am unable to do it.

      Map{
      id: map
      anchors.fill: parent
      plugin: Plugin{name: "osm"}
      activeMapType: MapType.TerrainMap

      This is what I am doing, the activeMapType always shows up an error.
      Thank you in advance,
      Vince

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Vince94cat said in What am I doing wrong with Map():

      activeMapType always shows up an error

      you should tell what error...
      Shouldn't activeMapType be inside Map {...}?

      Map
      {
          id: map
          anchors.fill: parent
          plugin: Plugin{name: "osm"
          activeMapType: MapType.TerrainMap
      }
      

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • Raghavendra KR Offline
        Raghavendra KR Offline
        Raghavendra K
        wrote on last edited by
        #3

        You have to assign a MapType value for activeMapType. The value you are assigning is a property in MapType...

        try this,
        MapType {
        style : MapType.TerrainMap
        }

        1 Reply Last reply
        1

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved