Displaying an encoded Polyline on Google Maps

To draw a line on Google map, we use a polyline. The Polyline class defines a linear overlay of connected line segments on the map. A Polyline object consists of an array of LatLng locations and creates a series of line segments that connect those locations in an ordered sequence.…