Вы можете использовать мою richmaps
библиотеку: https://github.com/antoniocarlon/richmaps
Вы можете легко создать градиентную ломаную линию следующим образом:
RichPolylineOptions polylineOpts = new RichPolylineOptions(null)
.zIndex(3) // zIndex represents the position of the polyline on the RichLayer
.strokeWidth(15)
.strokeColor(Color.YELLOW) // Set the polyline base color
.linearGradient(true)
.add(new RichPoint(new LatLng(40.22987, -3.95931)).color(Color.RED)) // Set color for some vertices
.add(new RichPoint(new LatLng(40.23109, -3.95926)))
.add(new RichPoint(new LatLng(40.23063, -3.95837)).color(Color.RED))
.add(new RichPoint(new LatLng(40.23169, -3.95809)))
.add(new RichPoint(new LatLng(40.23093, -3.95705)))
.add(new RichPoint(new LatLng(40.23023, -3.95626)));
RichPolyline polyline = polylineOpts.build();
polyline.add(new RichPoint(new LatLng(40.23163, -3.95602)).color(Color.CYAN)); // RichPoint added after the creation of the RichPolyline
richLayer.addShape(polyline);