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

Android : Map is laggy when using one finger but not two #939

Closed
treacks5 opened this issue Mar 8, 2022 · 1 comment
Closed

Android : Map is laggy when using one finger but not two #939

treacks5 opened this issue Mar 8, 2022 · 1 comment

Comments

@treacks5
Copy link

treacks5 commented Mar 8, 2022

I have a performance issue when the user is moving the map with one finger. The screen start to freeze more and more when the user is dragging the map with one finger. I post a record below :
https://user-images.githubusercontent.com/53431511/157230094-0c9f7f82-cff7-4179-9367-ae5b7199ae8f.mov

Another video when I move the map with two fingers (no freeze issue) :
https://user-images.githubusercontent.com/53431511/157230530-a0ced2e2-580a-42f4-a2ce-4c49106d4602.mov

Here is the code (just a container with the Mapbox map) :

@override
  Widget build(BuildContext context) {
    // This method is rerun every time setState is called, for instance as done
    // by the _incrementCounter method above.
    //
    // The Flutter framework has been optimized to make rerunning build methods
    // fast, so that you can just rebuild anything that needs updating rather
    // than having to individually change instances of widgets.
    return Container(
      width: MediaQuery.of(context).size.width,
      height: MediaQuery.of(context).size.height,
      child: MapboxMap(
        accessToken:
            'ACCESS_TOKEN',
        styleString: 'mapbox://styles/mapbox/outdoors-v10?optimize=true',
        initialCameraPosition: const CameraPosition(target: LatLng(0.0, 0.0)),
        // attributionButtonMargins: Point(0, 0),
      ),
    );
  }

It is weird because when you use 2 fingers you are doing more gestures on the map than with just one.

I precise that it is just an Android issue, iOS is working nice with one finger.

Flutter configuration :

Flutter 2.8.1 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 77d935af4d (3 months ago) • 2021-12-16 08:37:33 -0800
Engine • revision 890a5fca2e
Tools • Dart 2.15.1

Does someone have an idea on why I have this behaviour ?

@felix-ht
Copy link
Collaborator

felix-ht commented Mar 8, 2022

fixed on master with #779

@felix-ht felix-ht closed this as completed Mar 8, 2022
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

No branches or pull requests

2 participants