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

Details

    • Windows

    Description

      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   #")
                  }
              }
          }
      } 

      Attachments

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

        Activity

          People

            paangele Paolo Angelelli
            tiheikka Titta Heikkala
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes