selectRoute method
Changes the active/selected route to index and redraws the layers accordingly.
Implementation
Future<void> selectRoute(int index, {bool animateCamera = false}) async {
if (index < 0 || index >= _currentRoutes.length) return;
_selectedRouteIndex = index;
await drawRoutes(
_currentRoutes,
selectedIndex: index,
fitCamera: animateCamera,
);
}