Ash*_*dle 5 google-maps flutter google-maps-flutter
嘿,当将 GoogleMaps 添加到我的项目时,似乎每当拖动地图或移动相机时,都会出现大量日志垃圾邮件
I/Counters( 4961): exceeded sample count in FrameTime
Run Code Online (Sandbox Code Playgroud)
这似乎是此处报告的 flutter 中 GoogleMaps 的常见问题。
PS设置myLocationEnabled: false,不会解决问题,因为手动移动地图时仍然会发生这种情况
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,
);
}
}
Run Code Online (Sandbox Code Playgroud)
有谁知道是否有解决此问题的最佳方法的更新?谢谢
小智 -2
从谷歌地图小部件中删除一些图层
myLocationEnabled: false,
zoomGesturesEnabled: true,
scrollGesturesEnabled: true,
tiltGesturesEnabled: false,
rotateGesturesEnabled: true,
zoomControlsEnabled: false,
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2792 次 |
| 最近记录: |