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

Mapbox overlays are not correctly drawn after StackView transition

    XMLWordPrintable

    Details

      Description

      Steps to reproduce:

      1. Run the example code from below. A stroked line is drawn.
      2. Press the "Click me" button which will transition to a new StackView page.
      3. Press the "Click me" button which will close the page.
      4. The line is distorted or not drawn.
      import QtQuick 2.10
      import QtQuick.Controls 2.10
      
      import QtLocation 5.11
      import QtPositioning 5.6
      
      ApplicationWindow {
          visible: true
          width: 640
          height: 480
          title: qsTr("Mapbox Overlays")
      
          StackView {
              id: stackView
              anchors.fill: parent
      
              initialItem: Map {
                  id: map
      
                  gesture.acceptedGestures: MapGestureArea.PanGesture | MapGestureArea.FlickGesture | MapGestureArea.PinchGesture | MapGestureArea.RotationGesture | MapGestureArea.TiltGesture
                  gesture.flickDeceleration: 3000
                  gesture.enabled: true
                  //color: "transparent"
      
                  center: QtPositioning.coordinate(-27, 153)
      
                  plugin: Plugin {
                      name: "mapboxgl"
      
                      /*
                      PluginParameter {
                          name: "mapboxgl.mapping.use_fbo"
                          value: false
                      }*/
                  }
      
                  DynamicParameter {
                      type: 'paint'
                      property var layer: 'QtLocation-polyDashed'
                      property var lineWidth: 10
                      property var lineColor: 'white'
                      property var lineDasharray: [0, 2] // dashes
                  }
      
                  DynamicParameter {
                      type: 'layout'
                      property var layer: 'QtLocation-polyDashed'
                      property var lineCap: "round"
                  }
      
      
                  MapPolyline {
                      objectName: 'polyDashed'
                      id: poly
                      line.width: 10
                      line.color: 'deepskyblue'
      
                      path: [
                          { latitude: -27, longitude: 153.0 },
                          { latitude: -27, longitude: 154.1 },
                          { latitude: -28, longitude: 153.5 },
                          { latitude: -29, longitude: 153.4 }
                      ]
                  } // MapPolyline
      
                  Button {
                      anchors.centerIn: parent
                      text: "Click me"
                      onClicked: stackView.push(pageComponent)
                  }
              }
          }
      
          Component {
              id: pageComponent
      
              Page {
                  Button {
                      anchors.centerIn: parent
                      text: "Click me"
                      onClicked: stackView.pop()
                  }
              }
          }
      }
      
      

        Attachments

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

          Activity

            People

            Assignee:
            tmpsantos Thiago Marcos P. Santos
            Reporter:
            DanielSt Peter Staab
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes