是否可以在颤动的折线上添加箭头?

时间:2020-05-18 08:05:45

标签: dictionary flutter dart polyline google-maps-flutter

我已经在抖动中实现了一条折线

Map<PolylineId, Polyline> _mapPolylines = {};
  int _polylineIdCounter = 1;

  void _add() {
    final String polylineIdVal = 'polyline_id_$_polylineIdCounter';
    _polylineIdCounter++;
    final PolylineId polylineId = PolylineId(polylineIdVal);

    final Polyline polyline = Polyline(
      polylineId: polylineId,
      consumeTapEvents: true,
      color: Colors.red,
      width: 5,
      jointType: JointType.round,
      points: points, //_createPoints(),
    );

    setState(() {
      _mapPolylines[polylineId] = polyline;
    });
  }



并在地图上显示

    return new GoogleMap(
        mapType: MapType.normal,
        markers: Set.from(Markers),
        initialCameraPosition: _kGooglePlex,
        polylines: Set<Polyline>.of(_mapPolylines.values),
        onMapCreated: (GoogleMapController controller) async {
          _controller.complete(controller);
        });

我正在使用google_maps_flutter软件包,并试图指示到达我的路线的方向。

0 个答案:

没有答案