Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #61 Lines layer not rotating correctly with map #62

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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