주문형 이동이란 무엇인가요?
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
이 섹션의 문서에서는 Google Maps Mobility 주문형 이동 서비스로 이동을 만들고 사용하는 방법을 보여줍니다. 다음 사항에 익숙하다고 가정합니다.
사용할 TripService
은 gRPC 및 REST에서 사용할 수 있습니다.
간단하게 하기 위해 필드 참조는 gRPC 규칙을 따릅니다.
주문형 서비스용 Fleet Engine에서 여정은 소비자의 음식 배달 또는 차량 요청의 이행을 모델링하는 여정 유형입니다. 여정에는 NEW
, ENROUTE_TO_PICKUP
등 여정이 진행됨에 따라 Fleet Engine에 보고하는 상태가 있습니다. 이동 상태는 차량에 할당된 지리적 위치가 지정된 경유지에 해당하며 Fleet Engine은 사용자가 이동을 업데이트할 때마다 이러한 차량 경유지를 수정합니다. 여행과 차량의 관계에 대한 자세한 내용은 Fleet Engine 기본사항의 주문형 여행을 참고하세요.
여행 수명
Fleet Engine에서 각 여정을 추적하려면 먼저 Trip
엔티티를 만들어야 합니다. gRPC 또는 REST를 참고하세요.
다음 표에서는 시스템에서 생성된 여정의 전체 흐름과 Fleet Engine에서의 수명 주기 단계를 보여줍니다. Fleet Engine을 설정했고 운전자 앱에서 위치 업데이트가 사용 설정된 차량을 여정에 할당했다고 가정합니다. Driver SDK: 주문형 이동을 참고하세요.
1 |
예약 요청을 받습니다. |
Fleet Engine 여정이 시작되기 전에 예약 시스템은 먼저 앱이나 다른 예약 시스템을 통해 소비자로부터 차량 또는 배송 요청을 수신합니다. 그러면 시스템에서 픽업 위치와 같은 필수 필드를 사용하여 CreateTrip 로 이동 엔티티를 만듭니다.
이 시점에서 승객 및 하차 위치와 같은 다른 필드를 설정하거나 차량이 할당될 때까지 기다릴 수도 있습니다. 단일 목적지 여행 만들기를 참고하세요. |
2 |
차량 할당 |
시스템 내에서 직접 차량을 여정에 할당하고 할당을 Fleet Engine에 보고하거나 차량 검색 서비스를 사용하여 차량을 검색하고 여정과 차량 속성으로 필터링하여 여정을 완료하는 데 가장 적합한 차량을 찾을 수 있습니다. 검색 반경 내에 있는 온라인 차량은 Driver SDK에서 제공하는 위치 업데이트를 통해 근접성을 알립니다.
SearchVehicle 에서 여정과 일치하는 차량을 반환하면 시스템에서 UpdateTrip 엔드포인트를 호출하여 NEW 여정에 할당한 차량 ID를 보고합니다.
|
3 |
여행 업데이트 |
운전자가 이동을 수락하고 탑승 위치로 이동하기 시작하면 시스템에서 이동 상태를 NEW 에서 ENROUTE_TO_PICKUP 로 업데이트합니다. 앱에서 백엔드로 직접 연결하거나, Driver SDK에서 지속적으로 차량 위치 업데이트 스트림을 수신하는 Fleet Engine을 폴링하여 여정 내내 차량 위치를 계속 폴링합니다. 그러면 시스템에서 각 여정 주요 지점을 Fleet Engine에 보고하고, Fleet Engine은 이에 따라 차량의 경유지 목록을 업데이트합니다.
|
4 |
소비자와 여정 공유 |
Fleet Engine은 경로 세부정보와 차량 위치를 Consumer SDK에서 사용할 수 있도록 합니다. Consumer SDK는 리스너를 사용하여 경로 업데이트를 수신하고 이를 소비자 앱에 표시합니다. Fleet Engine은 예상 도착 시간, 남은 거리, 경로, 남은 차량 경유지를 자동으로 업데이트합니다. 자세한 내용은 주문형 이동의 여정 공유하기를 참고하세요. |
5 |
여행 완료 |
차량이 여정의 목적지 경유지에 도착하고 운전자가 여정이 완료되었다고 표시하면 시스템에서 Fleet Engine의 TripStatus 을 COMPLETE 로 설정합니다. 차량과 마찬가지로 이동 엔티티는 상태와 관계없이 Fleet Engine 내에서 7일 동안 활성 상태로 유지되며, 이 기간이 지나면 삭제됩니다. |
여행 시퀀스 흐름
다음 다이어그램은 이 흐름을 더 자세히 보여줍니다.

다음 단계
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-08-31(UTC)
[null,null,["최종 업데이트: 2025-08-31(UTC)"],[[["\u003cp\u003eThis documentation provides a comprehensive guide on utilizing the Google Maps Mobility on-demand trips service for managing and tracking trips.\u003c/p\u003e\n"],["\u003cp\u003eYou should have a foundational understanding of Fleet Engine, Vehicle Basics, and Trip Basics for on-demand services.\u003c/p\u003e\n"],["\u003cp\u003eFleet Engine's \u003ccode\u003eTripService\u003c/code\u003e enables the creation, assignment, updating, and completion of trips through gRPC or REST.\u003c/p\u003e\n"],["\u003cp\u003eTrips represent journeys fulfilling consumer requests, evolving through various statuses like \u003ccode\u003eNEW\u003c/code\u003e, \u003ccode\u003eENROUTE_TO_PICKUP\u003c/code\u003e, and \u003ccode\u003eCOMPLETE\u003c/code\u003e, influencing vehicle waypoints.\u003c/p\u003e\n"],["\u003cp\u003eThe trip lifecycle includes booking, vehicle assignment, status updates, consumer journey sharing, and completion, all managed through Fleet Engine interactions.\u003c/p\u003e\n"]]],[],null,["The documentation in this section shows how to create and work with trips using\nthe Google Maps Mobility on-demand trips service. It assumes familiarity with\nthe following:\n\n- **Fleet Engine** : You should be familiar with Fleet Engine implementation details, request mechanisms, and security. For that, see [What is the Fleet\n Engine service?](/maps/documentation/mobility/fleet-engine/essentials) and the security topics in [Set up Fleet Engine](/maps/documentation/mobility/fleet-engine/essentials/set-up-fleet).\n- **Vehicles basics** for on-demand services. See [Introduction to vehicles](/maps/documentation/mobility/fleet-engine/essentials/vehicles-intro).\n- **Trip basics** for on-demand services. See [On-demand trips](/maps/documentation/mobility/fleet-engine/essentials/trip-intro).\n\nThe `TripService` that you'll use is available for [gRPC](/maps/documentation/mobility/fleet-engine/reference/trips/rpc/maps.fleetengine.v1#tripservice) and [REST](/maps/documentation/mobility/fleet-engine/reference/trips/rest/v1/providers.trips).\nFor simplicity sake, field references follow the gRPC convention.\n\nIn Fleet Engine for on-demand services, a trip is a type of journey that models\nthe fulfillment of a food delivery or ride request from your consumers. A trip\nhas a status that you report to Fleet Engine as the journey evolves, such as\n`NEW`, `ENROUTE_TO_PICKUP`, and more. The trip status corresponds to geo-located\nwaypoints assigned to the vehicle, and Fleet Engine modifies these vehicle\nwaypoints with each trip update you make. See [On demand trips](/maps/documentation/mobility/fleet-engine/essentials/trip-intro) in **Fleet\nEngine essentials** for more about trips and their relationship to vehicles.\n\nLife of a trip\n\nIn order to track each trip in Fleet Engine, you must first create a `Trip`\nentity. See either [gRPC](/maps/documentation/mobility/fleet-engine/reference/trips/rpc/maps.fleetengine.v1#maps.fleetengine.v1.Trip) or [REST](/maps/documentation/mobility/fleet-engine/reference/trips/rest/v1/providers.trips) for reference.\n\nThe following table describes an example end-to-end flow of a trip created in\nyour system and its lifecycle stages in Fleet Engine. It assumes you have set up\nFleet Engine and have a vehicle to assign to the trip, with location updates\nenabled in the driver app. See [Driver SDK: On-demand trips](/maps/documentation/mobility/driver-sdk/on-demand).\n\n|---|----------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| 1 | **Receive booking request.** | Before a Fleet Engine trip begins, your booking system first receives a request for a ride or delivery from a consumer through your app or other booking system. Your system then creates the trip entity using `CreateTrip` with required fields, such as the pickup location. It can also set other fields at this point, such passengers and dropoff location, or wait until it assigns a vehicle. See [Create a single-destination trip](/maps/documentation/mobility/fleet-engine/journeys/trips/create-trip). |\n| 2 | **Assign vehicle.** | You can either assign vehicles to trips directly within your system and report the assignment to Fleet Engine, or you can use the [Search Vehicle](/maps/documentation/mobility/fleet-engine/essentials/vehicles/on-demand-search-vehicle) service to search for vehicles, filtering by both trip and vehicle attributes to find the best vehicle to complete the journey. Any online vehicle within your search radius makes their proximity known through location updates provided by the Driver SDK. Once `SearchVehicle` returns a vehicle that you match to a trip, your system calls the `UpdateTrip` endpoint to report the vehicle ID you assigned to the `NEW` trip. |\n| 3 | **Update trip.** | Once the driver accepts the trip and begins navigating to the pickup location, your system updates the trip status from `NEW` to `ENROUTE_TO_PICKUP`. You continue to poll the vehicle location throughout the journey, either through a direct connection from the app to your backend, or by polling Fleet Engine, which receives an ongoing stream of vehicle location updates from the Driver SDK. Your system then reports each journey milestone to Fleet Engine, which updates the vehicle's waypoint list accordingly. |\n| 4 | **Share journey with consumer.** | Fleet Engine makes trip details and vehicle location available to the Consumer SDK, which uses a listener to receive trip updates and display them in the consumer app. Fleet Engine automatically updates ETA, remaining distance, routes, and remaining vehicle waypoints. See [Share journeys for on-demand trips](/maps/documentation/mobility/journey-sharing/on-demand) for more information. |\n| 5 | **Complete trip.** | Once the vehicle reaches the destination waypoint of the trip and your driver indicates a successful trip, your system sets the `TripStatus` to `COMPLETE` in Fleet Engine. Keep in mind that, like vehicles, trip entities remain active within Fleet Engine for 7 days regardless of status, at which point they are removed. |\n\nTrip sequence flow\n\nThe following diagram shows a more detailed view of this flow.\n\nWhat's next\n\n- [Create a single-destination trip](/maps/documentation/mobility/fleet-engine/journeys/trips/create-trip)"]]