Skip to content

BUG: google_maps_flutter_web - Polylines not showing up #65152

@real1900

Description

@real1900

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

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work listd: examplesSample code and demosp: mapsGoogle Maps pluginpackageflutter/packages repository. See also p: labels.platform-webWeb applications specifically

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions