addRouteWithAlternatives method
Calculates multiple alternative routes and draws them on the map.
The active route is highlighted in blue, and alternative routes in slate gray. Use selectRoute to switch between paths.
Implementation
Future<PowerMapRoutesResult?> addRouteWithAlternatives({
required LatLng start,
required LatLng destination,
String profile = 'driving',
String language = 'th',
int maxAlternatives = 3,
bool fitCamera = true,
}) async {
return await routing.addRouteWithAlternatives(
start: start,
destination: destination,
profile: profile,
language: language,
maxAlternatives: maxAlternatives,
fitCamera: fitCamera,
);
}