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

reproducible example of incorrect MapPolyline drawing

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P2: Important P2: Important
    • 5.7.1
    • 5.7.0 Alpha
    • None
    • Qt 5.7 from git (compiled just now), Windows 7 x64
    • I7a0f6c4370fd6c50999fd2e5b1a7aa5954c8a8fc

      the following should draw 2 diagonal lines, however the second one is always horizontal

      import QtQuick 2.6
      import QtQuick.Controls 1.5
      import QtLocation 5.6
      
      ApplicationWindow {
          visible: true
          width: 640
          height: 480
      
          Map {
              id: map
              anchors.fill: parent
              plugin: Plugin { name: "osm" }
              center : poly.path[0]
      
              MapPolyline {
                  id: poly
                  line.width: 5
                  line.color: 'green'
              }
          }
      
          Button {
              height: 20
              width: 100
              text: "toggle"
              checkable: true
      
              onCheckedChanged: {
                  if(checked)
                  {
                      poly.path = [
                                  { latitude: 48.7, longitude: 9.3 },
                                  { latitude: 48.8, longitude: 9.2 }
                              ];
                  }
                  else
                  {
                      poly.path = [
                                  { latitude: 51.2, longitude: 6.7 },
                                  { latitude: 51.3, longitude: 6.8 }
                              ];
                  }
              }
          }
      }

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes