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

MapPolyline swap 2 first coordinates

    XMLWordPrintable

Details

    Description

      Based on this sample code:

      Item {
        Plugin {
          id: mapPlugin
          name: "osm" 
        } 
        Map {
          id: map 
          anchors.fill: parent 
          plugin: mapPlugin 
          center: QtPositioning.coordinate(48.79, 2.14) 
          zoomLevel: 14
      
          MapPolyline { 
            id: mpl 
            line.color: 'red' 
            line.width: 10 
            path: [ 
              QtPositioning.coordinate(48.79, 2.14), 
              QtPositioning.coordinate(48.79, 2.145),
              QtPositioning.coordinate(48.795, 2.145)
            ]
          } 
      
          Button { 
            text: "addPt"
            onClicked: { 
              mpl.addCoordinate(QtPositioning.coordinate(48.78, 2.12)) 
            }
          }
        }
      }

      First you get this display "Capture d'écran de 2018-02-26 15-17-30.png" => correct

      After hitting the button "addPt" you view "Capture d'écran de 2018-02-26 15-17-34.png" => incorrect (1st points is swapped)

      If you provide directly the coordinate (48.78, 2.12) at the end of the path definition, the display is directly the wrong one.

      Attachments

        For Gerrit Dashboard: QTBUG-66692
        # Subject Branch Project Status CR V

        Activity

          People

            paangele Paolo Angelelli
            shama Vincent Cagnard
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes