StaticMapPath
class. This class allows you to specify the size, color, outline, and the polyline to be drawn on the map.
The polyline string must be encoded using the Encoded Polyline Algorithm Format. You can use google_polyline_algorithm package to encode your path points, or provide the points directly.
Providing path points directly
You can provide a list of points directly, and leave it to our package to encode the polyline for you. Use theStaticMapPath.points()
constructor, example:
Avoid passing a large list of points directly, otherwise users can experience jank during encoding. Instead, install the google_polyline_algorithm package and encode the polyline in an isolate.