1

Is there a way to replicate this from google maps?

enter image description here

I currently have now the polyline on the road close to the marker but no dots when the marker is not on the road.

Jasmin Sojitra
  • 1,090
  • 10
  • 24

1 Answers1

0

Just add another polyline after the road's ones... it would be something like

      //in the setState()
      
      _polyline.add(
          Polyline(
              polylineId: PolylineId('another id of polyline'),
              color: ThemeColors.primary,
              width: 2,
              patterns: [ //< dotted style
                PatternItem.dash(8), 
                PatternItem.gap(15),
              ],
              points: const [
                LatLng(RoadLat, RoadLng),
                LatLng(DestinationLat, DestinationLng),
              ],
          )
      )
Gicu Aftene
  • 502
  • 2
  • 9