routeCalculate static method
void
routeCalculate({
- required List<
LatLng> wayPoints, - int? strategy,
- CalculateCallBack? calculateBack,
Implementation
static void routeCalculate({required List<LatLng> wayPoints, int? strategy, CalculateCallBack? calculateBack}) {
XbrSearch.routeSearchPage(
wayPoints: wayPoints,
strategy: strategy ?? DrivingStrategy.DEFAULT,
showFields: ShowFields.COST,
back: (code, data) {
if (code != 1000) return;
if(data.paths==null|| data.paths!.isEmpty) return;
if(calculateBack != null){
calculateBack(data.paths![0].distance?.toInt()??0,data.paths![0].duration?.toInt()??0);
}
},
);
}