setInterpolatedPath method
Property that defines the tour setInterpolatedPath
according to its current properties.
Implementation
setInterpolatedPath() {
//List<LatLng> allPoints = [];
for (int i = 0; i < numberOfPlaces - 1; i++) {
LatLng main_coords_i =
LatLng(lookAtCoordinates[i].latitude, lookAtCoordinates[i].longitude);
LatLng main_coords_i1 = LatLng(lookAtCoordinates[i + 1].latitude,
lookAtCoordinates[i + 1].longitude);
allPathPoints.add(main_coords_i);
allPathPoints.addAll(interpolatePoints(main_coords_i, main_coords_i1));
interpolatedPoints
.addAll(interpolatePoints(main_coords_i, main_coords_i1));
}
// Add the last place
allPathPoints.add(LatLng(lookAtCoordinates[numberOfPlaces - 1].latitude,
lookAtCoordinates[numberOfPlaces - 1].longitude));
}