Mark Alexander
Mark Alexander

Reputation: 311

google_maps_flutter_web : the google maps widget doesn't behave as the mobile version (polyline)

I'm currently working on a Flutter application mobile/web and I have an issue with the "google_maps_flutter" package. My goal is to display a map with a course drawn thanks to a polyline.

Here is a screenshot of the Android version which is working as expected

Now, we have the web version which displays the Polyline as a straight line heading to the north

Here is the code sample of my GoogleMap widget :

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),
            ),

Here are the google maps packages I'm using :

  google_maps_flutter: ^2.0.6
  google_maps_flutter_web: ^0.3.0+2

Thank you in advance for your time 🙏

Upvotes: 1

Views: 719

Answers (1)

Mark Alexander
Mark Alexander

Reputation: 311

Found it! The issue seems to be in the implementation of package:flutter_polyline_points :: decodePolyline method in the web:

https://github.com/Dammyololade/flutter_polyline_points/issues/40#issuecomment-751765055

Upvotes: 2

Related Questions