Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: google_maps_flutter_web - Polylines not showing up #65152

Closed
real1900 opened this issue Sep 3, 2020 · 15 comments · Fixed by flutter/plugins#3093
Closed

BUG: google_maps_flutter_web - Polylines not showing up #65152

real1900 opened this issue Sep 3, 2020 · 15 comments · Fixed by flutter/plugins#3093
Assignees
Labels
d: examples Sample code and demos p: maps Google Maps plugin P2 Important issues not at the top of the work list package flutter/packages repository. See also p: labels. platform-web Web applications specifically

Comments

@real1900
Copy link

real1900 commented Sep 3, 2020

It seems POLYLINES are not supported. I can see it on Mobile but not on the web.

Here is what my code looks like:

  GoogleMap(
        gestureRecognizers: Set()
          ..add(Factory<PanGestureRecognizer>(() => PanGestureRecognizer()))
          ..add(Factory<ScaleGestureRecognizer>(() => ScaleGestureRecognizer()))
          ..add(Factory<TapGestureRecognizer>(() => TapGestureRecognizer()))
          ..add(Factory<VerticalDragGestureRecognizer>(
              () => VerticalDragGestureRecognizer())),
        tiltGesturesEnabled: true,
        myLocationEnabled: true,
        myLocationButtonEnabled: true,
        mapToolbarEnabled: true,
        buildingsEnabled: true,
        markers: _markers,
        polylines: [
          Polyline(
            width: 4,
            polylineId: PolylineId("1"),
            color: userLocation.urgencyColor,
            points: [
              LatLng(userLocation.latitude, userLocation.longitude),
              UserLocation.kaaba,
            ],
          )
        ].toSet(),
        mapType: widget.mapType,
        zoomGesturesEnabled: true,
        scrollGesturesEnabled: true,
        rotateGesturesEnabled: true,
        compassEnabled: true,
        onMapCreated: _onMapCreated,
        initialCameraPosition: CameraPosition(
          target: LatLng(userLocation.latitude, userLocation.longitude),
          zoom: 19.0,
        ),
      ),
    );
  }
@darshankawar

This comment has been minimized.

@darshankawar darshankawar added in triage Presently being triaged by the triage team waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds labels Sep 3, 2020
@real1900

This comment has been minimized.

@no-response no-response bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Sep 3, 2020
@darshankawar darshankawar added d: examples Sample code and demos p: first party p: maps Google Maps plugin platform-web Web applications specifically labels Sep 3, 2020
@darshankawar darshankawar changed the title BUG: google_maps_flutter_web - Marker not working google_maps_flutter_web - how to add markers? Sep 3, 2020
@hello-addweb

This comment has been minimized.

@darshankawar darshankawar removed the in triage Presently being triaged by the triage team label Sep 3, 2020
@yjbanov yjbanov added the assigned for triage issue is assigned to a domain expert for further triage label Sep 3, 2020
@ditman

This comment has been minimized.

@ditman ditman added waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds and removed assigned for triage issue is assigned to a domain expert for further triage labels Sep 3, 2020
@ditman ditman removed their assignment Sep 3, 2020
@ditman ditman added the P3 Issues that are less important to the Flutter project label Sep 3, 2020
@ditman ditman modified the milestone: 1.23 - September 2020 Sep 3, 2020
@real1900 real1900 changed the title google_maps_flutter_web - how to add markers? google_maps_flutter_web - how to add polylines? Sep 4, 2020
@real1900
Copy link
Author

real1900 commented Sep 4, 2020

Sorry for the confusion -

I meant POLYLINES are not showing up not MARKERS.

My apologies

@no-response no-response bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Sep 4, 2020
@real1900 real1900 changed the title google_maps_flutter_web - how to add polylines? BUG: google_maps_flutter_web - Polylines not showing up Sep 4, 2020
@real1900
Copy link
Author

real1900 commented Sep 6, 2020

@darshankawar @ditman i updated the question

@ditman
Copy link
Member

ditman commented Sep 8, 2020

I meant POLYLINES are not showing up not MARKERS.

Polylines should be showing up, check this sample.

What polyline are you trying to plot?

@ditman ditman added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Sep 8, 2020
@real1900
Copy link
Author

I am basically trying to add one straight polyline between two latlngs .

@no-response no-response bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Sep 15, 2020
@real1900
Copy link
Author

I have shared my code in my original question

@ditman
Copy link
Member

ditman commented Sep 15, 2020

I'll take a look, this should work, but the example seems to be adding polylines after the fact, instead of adding them on the initial payload of the map. I'll make sure that works.

@real1900
Copy link
Author

Thanks . Please update me on the progress for this @ditman

@ditman
Copy link
Member

ditman commented Sep 30, 2020

Taking a look right now.

ditman added a commit to ditman/flutter-plugins that referenced this issue Oct 1, 2020
@ditman ditman self-assigned this Oct 1, 2020
@ditman ditman added P2 Important issues not at the top of the work list and removed P3 Issues that are less important to the Flutter project labels Oct 1, 2020
@ditman
Copy link
Member

ditman commented Oct 1, 2020

I've posted a PR with a fix for this issue (linked right above this message)

ditman added a commit to flutter/plugins that referenced this issue Oct 5, 2020
* Convert initial Polyline/Polygon points correctly.
* Convert Flutter Color to CSS correctly.

Fixes flutter/flutter#65152
Fixes flutter/flutter#67032
@ditman
Copy link
Member

ditman commented Oct 5, 2020

The fix for this has been published in google_maps_flutter_web v0.1.0+3

@ditman ditman added this to the 1.24 - October 2020 milestone Oct 5, 2020
jorgefspereira pushed a commit to jorgefspereira/plugins_flutter that referenced this issue Oct 10, 2020
* Convert initial Polyline/Polygon points correctly.
* Convert Flutter Color to CSS correctly.

Fixes flutter/flutter#65152
Fixes flutter/flutter#67032
FlutterSu pushed a commit to FlutterSu/flutter-plugins that referenced this issue Nov 20, 2020
* Convert initial Polyline/Polygon points correctly.
* Convert Flutter Color to CSS correctly.

Fixes flutter/flutter#65152
Fixes flutter/flutter#67032
@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 11, 2021
curt-weber pushed a commit to KWRI/google_maps_flutter that referenced this issue Nov 3, 2022
* Convert initial Polyline/Polygon points correctly.
* Convert Flutter Color to CSS correctly.

Fixes flutter/flutter#65152
Fixes flutter/flutter#67032
@flutter-triage-bot flutter-triage-bot bot added the package flutter/packages repository. See also p: labels. label Jul 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
d: examples Sample code and demos p: maps Google Maps plugin P2 Important issues not at the top of the work list package flutter/packages repository. See also p: labels. platform-web Web applications specifically
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants