Sau khi ghép nối người tiêu dùng với tài xế, bạn phải định cấu hình điểm đến của chuyến đi trong ứng dụng dành cho tài xế bằng cách thực hiện các bước sau:
Truy xuất điểm đến của xe từ bộ sưu tập điểm tham chiếu trong Fleet Engine, được trả về theo GetTrip(), UpdateTrip() và GetVehicle().
Đặt đích đến bằng cách gọi phương thức Navigation SDK cho iOS setDestinations().
Các ví dụ sau đây cho thấy cách thiết lập đích đến trong ứng dụng dành cho tài xế.
[null,null,["Cập nhật lần gần đây nhất: 2025-08-31 UTC."],[[["\u003cp\u003eThis guide explains how to set a vehicle's destination in the driver app after a trip is matched.\u003c/p\u003e\n"],["\u003cp\u003eYou need to retrieve the destination waypoints from Fleet Engine's \u003ccode\u003eGetTrip()\u003c/code\u003e, \u003ccode\u003eUpdateTrip()\u003c/code\u003e, or \u003ccode\u003eGetVehicle()\u003c/code\u003e methods.\u003c/p\u003e\n"],["\u003cp\u003eUse the Navigation SDK for iOS \u003ccode\u003esetDestinations()\u003c/code\u003e method to set the destination in the driver app, ensuring coordinates match the trip's waypoint for proper consumer app rendering.\u003c/p\u003e\n"]]],[],null,["# Set the vehicle's destination\n\nThis section documents how to set the vehicle's destination after your server\nmatches a trip to a vehicle.\n\nBefore you begin\n----------------\n\nThis section requires you to have completed the following:\n\n- [Initialize the Driver SDK](/maps/documentation/mobility/driver-sdk/on-demand/ios/initialize-sdk)\n- [Get the vehicle ready](/maps/documentation/mobility/driver-sdk/on-demand/ios/vehicle-ready)\n- [Create a trip in Fleet Engine](/maps/documentation/mobility/fleet-engine/journeys/trips/create-trip)\n\nSet the destination in the driver app\n-------------------------------------\n\nAfter you have paired a consumer with a driver, you must configure the trip's\ndestination in the driver app by performing the following steps:\n\n1. Retrieve the vehicle's destination from its waypoints collection in Fleet\n Engine, which is returned by `GetTrip()`, `UpdateTrip()` and `GetVehicle()`.\n\n2. Set the destination by calling the Navigation SDK for iOS method\n [`setDestinations()`](/maps/documentation/navigation-sdk-ios/reference/interface_g_m_s_navigator#ae62d9db4071a0df6c3651b9675356df8).\n\n | **Note:** For the consumer app to properly render the trip, make sure the geographic latitude/longitude coordinates supplied to `setDestinations()` match those in the trip's waypoint. For more information, see the tutorial [Navigate a route](/maps/documentation/navigation/ios-sdk/route).\n\nThe following examples show how to set the destination in the driver\napp. \n\n### Swift\n\n private func startNavigation() {\n let destinations = [\n GMSNavigationWaypoint(\n placeID: \"ChIJnUYTpNASkFQR_gSty5kyoUk\", title: \"PCC Natural Market\"),\n GMSNavigationWaypoint(\n placeID: \"ChIJJ326ROcSkFQRBfUzOL2DSbo\", title: \"Marina Park\"),\n ]\n\n mapView.navigator?.setDestinations(destinations, callback: { routeStatus in\n guard routeStatus == .OK else {\n // Error starting navigation.\n return\n }\n mapView.locationSimulator?.simulateLocationsAlongExistingRoute()\n mapView.navigator?.isGuidanceActive = true\n mapView.navigator?.sendsBackgroundNotifications = true\n mapView.cameraMode = .following\n })\n }\n\n### Objective-C\n\n - (void)startNavigation {\n NSArray\u003cGMSNavigationWaypoint *\u003e *destinations =\n @[[[GMSNavigationWaypoint alloc] initWithPlaceID:@\"ChIJnUYTpNASkFQR_gSty5kyoUk\"\n title:@\"PCC Natural Market\"],\n [[GMSNavigationWaypoint alloc] initWithPlaceID:@\"ChIJJ326ROcSkFQRBfUzOL2DSbo\"\n title:@\"Marina Park\"]];\n\n [_mapView.navigator setDestinations:destinations\n callback:^(GMSRouteStatus routeStatus) {\n if (routeStatus != GMSRouteStatusOK) {\n // Error starting navigation.\n return;\n }\n [_mapView.locationSimulator simulateLocationsAlongExistingRoute];\n _mapView.navigator.guidanceActive = YES;\n _mapView.navigator.sendsBackgroundNotifications = YES;\n _mapView.cameraMode = GMSNavigationCameraModeFollowing;\n }];\n }"]]