GoogleMaps Flutter Exceeded sample count in FrameTime Log

2.8k Views Asked by At

Hey when adding GoogleMaps to my project, it seems that anytime the map is dragged or the camera is moved there is a spam of logs for

I/Counters( 4961): exceeded sample count in FrameTime

This seems to be a common issue with GoogleMaps in flutter reported here.

Here and Here

P.S. Setting myLocationEnabled: false, will not solve the issue as this still occurs when manually moving the map

class MyMap extends StatelessWidget {
  const MyMap({
    Key? key,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return GoogleMap(
      initialCameraPosition: CameraPosition(
        target: state.location ?? const LatLng(0, 0),
        zoom: 15.0,
      ),
      mapType: MapType.normal,
      myLocationEnabled: false,
      zoomGesturesEnabled: true,
      scrollGesturesEnabled: true,
      tiltGesturesEnabled: false,
      rotateGesturesEnabled: true,
      zoomControlsEnabled: false,
    );
  }
}

Does anyone know if there is an update on the best way to fix this? Thanks

1

There are 1 best solutions below

0
On

delete some layers from widget google maps flutter

  myLocationEnabled: false,
  zoomGesturesEnabled: true,
  scrollGesturesEnabled: true,
  tiltGesturesEnabled: false,
  rotateGesturesEnabled: true,
  zoomControlsEnabled: false,