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

TapHandler with a MapPolyline is not getting tapped events when the Map is rotated

XMLWordPrintable

    • Windows
    • 5
    • 0c4874978 (dev), 61b45f12c (6.9), 75fc674e8 (6.8)
    • Foundation Sprint 129

      If there’s a MapItemView that has a MapPolyline with a TapHandler as the delegate the TapHanlder is not getting the events when the map is rotated (bearing is changed). Resetting the rotation restores the tap’s normal behavior. It looks like sometimes tapping the position where the polyline was before rotation, the event gets triggered. Could it be that the MapPolyline or TapHandler doesn’t know the rotation?
      Attached is a modified version of the Minimal Map example that shows the issue. Here’s a simple version of the code that’s interesting here:

      Map {
          id: map
          ...
          MapItemView {
              id: mapItemView
              model: 1
              delegate: MapPolyline {
                  line.width: 10
                  line.color: 'green'
                  path: [
                      ...
                  ]
                  TapHandler {
                     gesturePolicy: TapHandler.ReleaseWithinBounds
                     grabPermissions: PointerHandler.CanTakeOverFromAnything
                                   | PointerHandler.ApprovesTakeOverByHandlersOfDifferentType
                                   | PointerHandler.ApprovesTakeOverByItems
                     onSingleTapped: console.log("#   Polyline hit   #")
                  }
              }
          }
      } 

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

            matthias_rauter Matthias Rauter
            tiheikka Titta Heikkala
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes