Consumer SDK のスケジュール済みタスクの概要
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
消費者が配達やサービス注文のスケジュールを確認できるようにすることで、スケジュール設定されたタスクの消費者向けエクスペリエンスをカスタマイズします。
スケジュール設定されたタスク用の Consumer SDK とは何ですか?
Consumer SDK は、スケジュールされたタスク用の Fleet Engine の機能です。また、ユーザー エクスペリエンスを作成するためのツールキットも含まれています。これらのツールキットを使用すると、地図ベースのディスプレイを作成して、ドライバーの進捗状況を可視化し、スケジュールされた停車に関連付けられたタスクのステータスを表示できます。このドキュメントは、主に次の 2 つの対象読者を想定しています。
- 個別の配送注文の配送ステータスを知りたい一般のお客様。このドキュメントでは、JavaScript の Consumer SDK を使用して、そのユーザー エクスペリエンスを実装する方法について説明します。Consumer SDK は、
FleetEngineShipmentLocationProvider
クラスと関連するインターフェースを提供します。
- フリート オペレーター: 車両のフリート全体の配送状況と車両ステータスを追跡したい場合。フリートの追跡については、フリート追跡ガイドをご覧ください。

スケジュール設定されたタスクに Consumer SDK を使用する理由
Consumer SDK を定期的なタスクのコンシューマー アプリケーションに統合すると、ほぼリアルタイムの位置情報の更新と道路にスナップされた位置情報により、包括的なコンシューマー エクスペリエンスを提供できます。配送車両の位置と進捗状況の詳細をユーザーが確認できるため、荷物がどこにあるかを把握できます。
Consumer SDK でできること
Consumer SDK を使用して、次の配送情報を消費者に共有します。
- 地図上の配達車両のリアルタイムの位置。
- 交通状況などの変化する状況に合わせて調整された、荷物の到着予定時刻。
- 車両が走行しているルート。
- 荷物が配達されるまでの距離と残りの配送先。
また、Driver SDK の位置情報に基づいて、消費者向けアプリやウェブサイト内でシームレスな位置情報対応のユーザー エクスペリエンスを作成することもできます。Driver SDK の詳細については、Driver SDK のスケジュール設定されたタスクの概要をご覧ください。
Consumer SDK コンポーネント
JavaScript Consumer SDK には次のコンポーネントが含まれています。
- 標準の
google.maps.Map
エンティティのドロップイン置換となる JavaScript マップ コンポーネント。
- Fleet Engine と接続するデータ コンポーネント。
- 目的地に向かう車両とルートの進行状況を可視化するためのコンポーネント。
- ドライバーの到着予定時刻や残りの運転距離の生データフィード。
次の表に、コンポーネントを示します。
コンポーネント |
説明 |
地図表示 |
地図ビューには車両の進行状況が表示され、車両がルートに沿って移動するとビューが更新されます。 |
配送場所プロバイダ |
配送追跡プロバイダは、地図に配送に関する有用な情報(配送物の集荷場所や配送場所、配送車両の位置やルートなど)を表示できるように、位置情報フィードを提供します。
|
認証トークン フェッチャー |
認証トークン フェッチャーは、バックエンド サーバーから JSON Web Token(JWT)を取得して、Fleet Engine に保存されている位置情報へのアクセスを認証します。JavaScript Journey Sharing Library を使用して、ウェブ アプリケーションの一部として認証トークン フェッチャーを実装します。バックエンド サーバーで Fleet Engine の JSON ウェブトークン(JWT)作成サービスも実装する必要があります。 |
地図のスタイルのオプション |
カスタム スタイル設定オプションを使用すると、地図のデフォルトのスタイル設定をウェブ アプリケーションのスタイル設定に合わせて変更できます。 |
Consumer SDK の使用方法
次のステップ
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-08-31 UTC。
[null,null,["最終更新日 2025-08-31 UTC。"],[[["\u003cp\u003eThe Consumer SDK enables businesses to provide customers with real-time visibility into the location and progress of their scheduled deliveries or service orders.\u003c/p\u003e\n"],["\u003cp\u003eThis SDK offers tools for creating map-based displays within consumer applications, showing the driver's location, estimated time of arrival, and route information.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can integrate the Consumer SDK to create a comprehensive and seamless delivery tracking experience for their customers, improving transparency and satisfaction.\u003c/p\u003e\n"],["\u003cp\u003eKey components of the SDK include a map view, a location provider, authentication mechanisms, and customizable styling options to tailor the experience.\u003c/p\u003e\n"],["\u003cp\u003eTo begin, developers need to set up the JavaScript Consumer SDK, follow a specific shipment for tracking, and customize the map interface as desired.\u003c/p\u003e\n"]]],[],null,["Tailor the consumer experience for scheduled tasks by allowing consumers to\nfollow the progress of their scheduled deliveries or service orders.\n\nWhat is the Consumer SDK for scheduled tasks?\n\nThe Consumer SDK is a feature of Fleet Engine for scheduled tasks that also\nincludes toolkits to create the consumer experience. These toolkits let you\ncreate map-based displays to visualize a driver's\nprogress and show the status of the task associated with a scheduled stop. It's\ndesigned for two primary audiences:\n\n- **Consumer end users** who want to know delivery status for an individual shipment order. This document covers how to implement that consumer experience with the Consumer SDK in JavaScript, which provides the `FleetEngineShipmentLocationProvider` class and associated interfaces.\n- **Fleet operators** who want to track the delivery and vehicle status for an entire fleet of vehicles. For information about tracking fleets, see the [Fleet tracking guide](/maps/documentation/mobility/operations/fleet-tracking).\n\nWhy use the Consumer SDK for scheduled tasks?\n\nIntegrating the Consumer SDK into your scheduled tasks consumer applications\nlets you provide a comprehensive consumer experience, with near real-time\nlocation updates and road-snapped positions. Your consumers can see the delivery\nvehicle's location and progress details that help them understand where their\nshipment is.\n\nWhat can you do with the Consumer SDK?\n\nUse the Consumer SDK to share the following shipment information with your\nconsumers:\n\n- Delivery vehicle's real-time position on a map.\n- ETA for package arrival, adjusted for changing circumstances, such as traffic.\n- Route the vehicle is taking.\n- Distance and number of stops remaining before their shipment is delivered.\n\nYou can also create other seamless geo-enabled consumer experiences inside your\nconsumer app or website based on location information from the Driver SDK. For\ndetails about the Driver SDK, see the\n[Driver SDK scheduled tasks overview](/maps/documentation/mobility/driver-sdk/scheduled).\n\nConsumer SDK components\n\nThe JavaScript Consumer SDK contains the following components:\n\n- A JavaScript map component that is a drop-in replacement for a standard `google.maps.Map` entity.\n- Data components to connect with Fleet Engine.\n- Components for visualization of the vehicle and route as it progresses to a destination.\n- Raw data feeds for a driver's ETA or the remaining distance to drive.\n\nThe following table describes the components.\n\n| Component | Description |\n|------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Map view | The map view illustrates the progress of the vehicle, updating the view as the vehicle moves along its route. |\n| Shipment location provider | The shipment tracking provider provides a location feed so that the map can display useful information about the shipment, such as the pickup or delivery location of the shipment and the location and route of the delivery vehicle. |\n| Authentication token fetcher | The authentication token fetcher gets JSON Web Tokens (JWTs) from your backend server to authenticate access to the location data stored in Fleet Engine. You implement an authentication token fetcher as part of your web application using the JavaScript Journey Sharing Library. Note that you must also implement a JSON Web Token (JWT) creation service for Fleet Engine on your backend server. |\n| Map style options | You can use custom styling options to change the default styling of your map to match the styling of your web application. |\n\nHow to use the Consumer SDK\n\n|---|----------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| 1 | **Set up the JavaScript Consumer SDK** | For more information, see [Set up the JavaScript Consumer SDK](/maps/documentation/mobility/journey-sharing/scheduled/shipment-tracking/setup). |\n| 2 | **Follow a shipment** | Learn how to initialize the map, start following a shipment, and stop following with appropriate clean up. See [Follow a shipment](/maps/documentation/mobility/journey-sharing/scheduled/shipment-tracking/follow). |\n| 3 | **Customize the map interface** | You can use the JavaScript Consumer SDK for scheduled tasks to customize the map interface, provide marker customization, or style polylines. See [Style a map](/maps/documentation/mobility/journey-sharing/scheduled/shipment-tracking/style-map), [Customize markers](/maps/documentation/mobility/journey-sharing/scheduled/shipment-tracking/customize-markers), and [Customize polylines](/maps/documentation/mobility/journey-sharing/scheduled/shipment-tracking/customize-polylines). |\n\nWhat's next\n\n- [Set up the JavaScript Consumer SDK](/maps/documentation/mobility/journey-sharing/scheduled/shipment-tracking/setup)"]]