I have an API that returns an encoded polyline string and I need to show the polyline on a map.
How can I trasform the String "_p~iF~ps|U_ulLnnqC_mqNvxq`@" to a Set<Polyline> ?
GoogleMap(
mapType: MapType.normal,
initialCameraPosition: initialPosition,
polylines: ????,
),
I tried with google_polyline_algorithm library, but when I decode the polyline I get a List<List<num>> instead of a Set<Polyline>.
I have implemented like this and it worked
Plugin used:
For GoogleMap:
To get the Direction from Google Direction API
The Direction Model:
To get the Polylines: