google-maps - flutter google_maps捏以缩放

标签 google-maps flutter dart hybrid-mobile-app

我正在尝试在flutter中实现google_maps,在其中我可以像官方google maps一样捏捏来进行放大和缩小。我找不到任何实现相同方法的方法。
我的代码段是-

GoogleMap(
       onMapCreated: _onMapCreated,
       initialCameraPosition: CameraPosition(
       target: _center,
       zoom: -3.0
       ),
       scrollGesturesEnabled: true,
       zoomGesturesEnabled: true,
       myLocationButtonEnabled: false,
       gestureRecognizers: Set()
         ..add( Factory<PanGestureRecognizer>(() => PanGestureRecognizer())),
       markers: markers
   );

预先感谢。

最佳答案

问题是缩放级别为负,但是最小缩放级别为0。

关于google-maps - flutter google_maps捏以缩放,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60489305/

相关文章:

javascript - Google Maps Web API - KML IconStyle 颜色不起作用

android - 是否可以通过Google Places API获取 "Popular times"信息

firebase - 更新 flutter 后,Firebase.initializeApp() 似乎不再在我的手机上工作

dart - Dart2Js 中按位运算,结果错误

c# - 如何在谷歌地图中使用 jquery 动态绑定(bind)多个标记

css - 如何将多个交互式 DIV 添加到 Google Map - 将鼠标悬停在上面时会改变大小

flutter - 如何在 Flutter 中使用 Material 3 表面色调?

flutter 表日历 : CalendarController Question

firebase - 无法从Firestore读取数据

flutter - 如何在 Flutter 中格式化日期时间?删除 DateTime 中的毫秒数?