selectStartPoi method

void selectStartPoi(
  1. PointOfInterest poi
)

Sets the start point from a POI search result and recalculates the route.

Implementation

void selectStartPoi(PointOfInterest poi) {
  _isCalculating = true;
  _startPointType = ItineraryStartPointType.pointOfInterest;
  _startPoint = ItineraryPoint(
    name: poi.name,
    coordinate: poi.coordinate,
    id: poi.id,
  );
  _notify();
  _mapManager!.removeItinerary();
  _mapManager!.addItinerary(
    origin: poi.coordinate,
    destination: _endPoint!.coordinate,
  );
  unfocusStartPoint();
}