Skip to content

Conversation

Camerash
Copy link

As title. Fix #61

@elliotnash
Copy link

While this fixes the polylines not rotating correctly, the corresponding touch input still rotates incorrectly so taps no longer after rotating the map.

@trauma-and-drama
Copy link

I'd prepare a fix pull request, but I am still figuring out the plugin in more detail.

MobileLayerTransformer would have to include the gestureDetector.

This should fix it:

return Container(
        child: MobileLayerTransformer(
      child: GestureDetector(
        behavior: HitTestBehavior.translucent,
        onDoubleTap: () {
          // For some strange reason i have to add this callback for the onDoubleTapDown callback to be called.
        },
        onDoubleTapDown: (TapDownDetails details) {
          _zoomMap(details, context);
        },
        onTap: () {
          print("onTap ${this.key}");
        },
        onTapUp: (TapUpDetails details) {
          print("onTapUp ${this.key}");
          _forwardCallToMapOptions(details, context);
          _handlePolylineTap(details, onTap, onMiss);
        },
        child: Stack( // <-- no need for stack either
          children: [
            CustomPaint(
              painter: PolylinePainter(lines, mapState),
              size: size,
            ),
          ],
        ),
      ),
    ));`

@JaffaKetchup
Copy link
Contributor

Hey @trauma-and-drama,
Please check #68 (comment) :)

@trauma-and-drama
Copy link

@JaffaKetchup, ah. Thanks for the pointer. apparently I also need to brush up on my github skill 😂.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Lines are flying away on pinch rotation
4 participants