نمای کلی وظایف برنامه ریزی شده SDK مصرف کننده
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
با اجازه دادن به مشتریان برای پیگیری پیشرفت تحویل برنامهریزیشده یا سفارشهای خدمات، تجربه مصرفکننده را برای وظایف برنامهریزیشده تنظیم کنید.
Consumer SDK برای کارهای برنامه ریزی شده چیست؟
Consumer SDK یکی از ویژگی های Fleet Engine برای کارهای برنامه ریزی شده است که شامل مجموعه ابزارهایی برای ایجاد تجربه مصرف کننده نیز می شود. این جعبه ابزار به شما امکان می دهد نمایشگرهای مبتنی بر نقشه ایجاد کنید تا پیشرفت راننده را تجسم کنید و وضعیت کار مرتبط با توقف برنامه ریزی شده را نشان دهید. برای دو مخاطب اصلی طراحی شده است:
- کاربران نهایی مصرف کننده که می خواهند از وضعیت تحویل برای یک سفارش حمل و نقل فردی مطلع شوند. این سند نحوه پیادهسازی تجربه مصرفکننده با Consumer SDK در جاوا اسکریپت را پوشش میدهد که کلاس
FleetEngineShipmentLocationProvider
و رابطهای مرتبط را ارائه میکند. - اپراتورهای ناوگانی که می خواهند وضعیت تحویل و وسیله نقلیه را برای کل ناوگان وسایل نقلیه پیگیری کنند. برای اطلاعات در مورد ناوگان ردیابی، راهنمای ردیابی ناوگان را ببینید.

چرا از Consumer SDK برای کارهای برنامه ریزی شده استفاده کنیم؟
ادغام SDK مصرفکننده در برنامههای مصرفکننده وظایف برنامهریزیشده، به شما امکان میدهد یک تجربه جامع برای مصرفکننده، با بهروزرسانیهای مکان تقریباً همزمان و موقعیتهای جادهای را فراهم کنید. مشتریان شما میتوانند موقعیت وسیله نقلیه تحویلی و جزئیات پیشرفت را ببینند که به آنها کمک میکند بفهمند محمولهشان کجاست.
با Consumer SDK چه کاری می توانید انجام دهید؟
از Consumer SDK برای به اشتراک گذاشتن اطلاعات حمل و نقل زیر با مصرف کنندگان خود استفاده کنید:
- موقعیت خودروی تحویل در زمان واقعی روی نقشه.
- ETA برای رسیدن بسته، تنظیم شده برای شرایط متغیر، مانند ترافیک.
- مسیری که وسیله نقلیه طی می کند.
- مسافت و تعداد توقف های باقی مانده قبل از تحویل محموله آنها.
همچنین میتوانید سایر تجربیات مصرفکننده با قابلیت جغرافیایی بدون درز را در برنامه مصرفکننده یا وبسایت خود بر اساس اطلاعات مکان از Driver SDK ایجاد کنید. برای جزئیات بیشتر در مورد Driver SDK، به نمای کلی وظایف برنامه ریزی شده Driver SDK مراجعه کنید.
اجزای SDK مصرف کننده
JavaScript Consumer SDK شامل اجزای زیر است:
- یک جزء نقشه جاوا اسکریپت که جایگزینی برای یک موجودیت استاندارد
google.maps.Map
است. - اجزای داده برای اتصال با Fleet Engine.
- مولفه هایی برای تجسم وسیله نقلیه و مسیری که به سمت مقصد پیش می رود.
- داده های خام برای ETA راننده یا مسافت باقی مانده برای رانندگی تغذیه می شود.
جدول زیر اجزاء را شرح می دهد.
جزء | توضیحات | نمای نقشه | نمای نقشه پیشرفت وسیله نقلیه را نشان میدهد و با حرکت خودرو در مسیر خود، نمای آن را بهروزرسانی میکند. |
ارائه دهنده محل حمل و نقل | ارائهدهنده ردیابی محموله یک خوراک موقعیت مکانی ارائه میکند تا نقشه بتواند اطلاعات مفیدی را درباره محموله، مانند محل تحویل یا تحویل محموله و مکان و مسیر وسیله نقلیه تحویل، نمایش دهد. |
واکشی نشانه احراز هویت | واکشی نشانه احراز هویت، JSON Web Tokens (JWTs) را از سرور پشتیبان شما برای احراز هویت دسترسی به داده های مکان ذخیره شده در Fleet Engine دریافت می کند. شما با استفاده از کتابخانه اشتراک گذاری سفر جاوا اسکریپت، یک واکشی نشانه احراز هویت را به عنوان بخشی از برنامه وب خود پیاده سازی می کنید. توجه داشته باشید که باید سرویس ایجاد JSON Web Token (JWT) را برای Fleet Engine در سرور باطن خود پیاده سازی کنید. |
گزینه های سبک نقشه | میتوانید از گزینههای یک ظاهر طراحی سفارشی برای تغییر استایل پیشفرض نقشه خود برای مطابقت با استایل برنامه وب خود استفاده کنید. |
نحوه استفاده از Consumer SDK
1 | JavaScript Consumer SDK را تنظیم کنید | برای اطلاعات بیشتر، به تنظیم JavaScript Consumer SDK مراجعه کنید. |
2 | یک محموله را دنبال کنید | بیاموزید که چگونه نقشه را مقداردهی اولیه کنید، یک محموله را دنبال کنید و با پاکسازی مناسب دیگر دنبال نکنید. به دنبال یک محموله مراجعه کنید. |
3 | رابط نقشه را سفارشی کنید | میتوانید از JavaScript Consumer SDK برای کارهای برنامهریزیشده برای سفارشیسازی رابط نقشه، ارائه سفارشیسازی نشانگر، یا استایل چند خطوط استفاده کنید. به Style a map , Customize marker , and Customize polylines مراجعه کنید. |
بعدش چی
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-08-29 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-08-29 بهوقت ساعت هماهنگ جهانی."],[[["\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)"]]