0

I am using code below to draw but its not working

 polyline = Polyline(
  polylineId: polylineId,
  color: Colors.red,
  width: 5,
  jointType: JointType.round,
  points:  latLongList,
);
  _mapPolylines[polylineId] = polyline;

Output is red line but i need blue line as output

Output is red line but i need blue line as output

LOVKUSH SINGH
  • 13
  • 1
  • 2
  • You just need to remove all other coordinates from your latLongList and pass only the initial and destination coordinates. Are you doing this already? – Nelson Jr. Dec 06 '21 at 01:46
  • I solved the issue. Issue was due to duplicate coordinates as i am using live location tracker to update the polylines. Adding coordinates with specific minimum distance between previous coordinate and new coordinate solved my issue. – LOVKUSH SINGH Dec 08 '21 at 14:39

1 Answers1

0

I solved the issue. Issue was due to duplicate coordinates as i am using live location tracker to update the polylines. Adding coordinates with specific minimum distance between previous coordinate and new coordinate solved my issue.

LOVKUSH SINGH
  • 13
  • 1
  • 2
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Dec 08 '21 at 18:29
  • Hey can you help me with this? – Zzz May 02 '22 at 19:10