নেভিগেশন পয়েন্ট টোকেন ব্যবহার করে রুট করুন

ইউরোপীয় অর্থনৈতিক অঞ্চল (EEA) ডেভেলপাররা

Navigation point tokens allow you to send key contextual information about a destination to the Navigation SDK for Android , Navigation SDK for iOS , or the Routes API for improved routing and driver experience. This is useful in cases like food delivery or rideshare, where the pickup or dropoff point may be ambiguous without user input.

To create and pass a navigation point token, use the Destinations method of the Geocoding API to allow your users to select a preferred location from a list of navigation points . The user's selection becomes a navigation point returned by the Destinations method of the Geocoding API.

You can then pass the navigation point token, which contains both the destination coordinates as well as contextual information, to the Navigation SDK for Android or the Navigation SDK for iOS , or the Routes API , where a waypoint is created for precise routing. The destination will be highlighted for the driver by the Navigation SDK based on the Place the token is associated with.

Example: Rideshare use case

সংক্ষিপ্ত বিবরণ

This example shows how to combine the Geocoding API, Routes API, and the Navigation SDK for iOS or Android to create a rideshare app that calculates route price and directs drivers to the correct pickup point.

These are the steps at a high level:

  1. জিওকোডিং এপিআই-এর মাধ্যমে একটি নেভিগেশন পয়েন্ট টোকেন পুনরুদ্ধার করুন।
  2. একটি রুট গণনা করতে এবং সেটিকে একটি রুট টোকেনে এনকোড করতে Routes API ব্যবহার করুন।
  3. নেভিগেশন পয়েন্ট টোকেন এবং রুট টোকেন উভয়ই নেভিগেশন SDK-তে প্রেরণ করুন।
  4. ড্রাইভারকে সঠিক পিকআপ পয়েন্টে পৌঁছে দিতে নেভিগেশন এসডিকে ব্যবহার করুন।

প্রাসঙ্গিক রাউটস এপিআই, আইওএস-এর জন্য নেভিগেশন এসডিকে এবং অ্যান্ড্রয়েড-এর জন্য নেভিগেশন এসডিকে-এর ডকুমেন্টেশনের লিঙ্কের জন্য ' আরও পঠন' বিভাগটি দেখুন।

This diagram shows how a rideshare or delivery app would use the Geocoding API, Routes API, and Navigation SDK for iOS or Android to route a driver using a route token and navigation point token:

Rideshare or delivery use case diagram
Diagram of a rideshare or delivery use case

Rideshare example

Imagine a rideshare scenario where there is an app for the consumer to book the ride, and a second app for the driver to receive notification of the ride and routing information to the destination.

এই চিত্রে একটি গ্রাহক রাইডশেয়ার অ্যাপের উদাহরণ দেখানো হয়েছে যেখানে নেভিগেশন পয়েন্ট নির্বাচন করা হয়েছে, এবং একটি ড্রাইভার অ্যাপ দেখানো হয়েছে যা অ্যান্ড্রয়েডের জন্য নেভিগেশন এসডিকে ব্যবহার করে ড্রাইভারকে নির্ভুলভাবে পথ দেখায়।

Examples of consumer and driver apps

যখন কোনো ব্যবহারকারী অ্যাপটি খোলেন, তখন অ্যাপটি জিওকোডিং এপিআই-এর ডেস্টিনেশনস মেথডকে কল করে এবং ব্যবহারকারীকে সম্ভাব্য কিছু নেভিগেশন পয়েন্টের একটি তালিকা প্রদান করে:

Consumer choosing a drop off point

ব্যবহারকারী তার পছন্দের পয়েন্টটি বেছে নেন, যা একটি SearchDestinations রিকোয়েস্টের রেসপন্স বডিতে থাকা navigationPoints এর অ্যারের মধ্যে একটি।

"navigationPoints": [
    {
      "navigationPointToken": <encoded navigation point token>,
      "displayName": "South Entrance",
      "travelModes": ["DRIVE"],
      "usages": ["PICKUP","DROPOFF"],
      "location": {
        "lat": 37.3940894,
        "lng": -122.0788389
      }
    }
]

অ্যাপের ব্যাকএন্ড রুট গণনা করতে এবং একটি রুট টোকেন পুনরুদ্ধার করার জন্য Routes API-কে নেভিগেশন পয়েন্ট টোকেনটি প্রদান করে।

Finally, both the navigation point token and the route token are passed to a mobile driver app that uses the Navigation SDK for iOS or Android to create a waypoint to route the driver to the correct pickup point.

আরও পড়ুন