我目前正在开发Flutter应用程序mobile/web;google_maps_flutter";包裹我的目标是显示一张地图,地图上有一条多段线。
这是安卓版本的屏幕截图,它正在按预期运行
现在,我们有了网络版本,它将多段线显示为指向北的直线
以下是我的GoogleMap
小部件的代码示例:
GoogleMap(
gestureRecognizers: Set()
..add(Factory<PanGestureRecognizer>(
() => PanGestureRecognizer())),
initialCameraPosition: CameraPosition(
target: polylines.first.points.first, zoom: 20.0),
mapType: MapType.hybrid,
polylines: polylines,
compassEnabled: false,
tiltGesturesEnabled: false),
),
以下是我正在使用的谷歌地图包:
google_maps_flutter: ^2.0.6
google_maps_flutter_web: ^0.3.0+2
提前感谢您抽出时间🙏
找到了!问题似乎出现在包的实现中:flaft_polyline_points::decodePolyline方法在web中:
https://github.com/Dammyololade/flutter_polyline_points/issues/40#issuecomment-751765055