Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-52514

MapPolygon inside Repeater not working

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.6.2, 5.7.1
    • 5.6.1, 5.7.0 Alpha
    • None
    • Qt 5.7 from git, Windows

    Description

      I have n polygons that I want to show (c++ model), therefore the simplest approach is to put a MapPolygon inside a Repeater. However this leads to nothing being drawn + no error messages.

      import QtQuick 2.6
      import QtQuick.Controls 1.5
      import QtLocation 5.6
      
      ApplicationWindow {
          visible: true
          width: 640
          height: 480
          title: qsTr("Hello World")
      
          Map {
              anchors.fill: parent
              plugin: Plugin { name: "osm" }
      
              center { latitude: -27; longitude: 153.0 }
      
              height: 1; width: 1 // https://bugreports.qt.io/browse/QTBUG-52030
      
              zoomLevel: 6
      
              Repeater {
                  model: 3 // some dynamic c++ model etc
      
                  MapPolyline {
                      line.width: 3
                      line.color: 'green'
                      path: [
                          { latitude: -27 + index, longitude: 153.0 },
                          { latitude: -27 + index, longitude: 154.1 },
                          { latitude: -28 + index, longitude: 153.5 },
                          { latitude: -29 + index, longitude: 153.5 }
                      ]
                  }
              }
          }
      }
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            paangele Paolo Angelelli
            alexander_lanin Alexander
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes