কম্পিউট রুট ওভারভিউ,কম্পিউট রুট ওভারভিউ,কম্পিউট রুট ওভারভিউ,কম্পিউট রুট ওভারভিউ
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
ইউরোপিয়ান ইকোনমিক এরিয়া (EEA) ডেভেলপার 
ভূমিকা
কম্পিউট রুট হল রুট API পরিষেবার একটি পদ্ধতি যা একটি HTTPS অনুরোধ গ্রহণ করে এবং দুটি অবস্থানের মধ্যে আদর্শ রুট প্রদান করে। ট্রানজিট, বাইক চালানো, ড্রাইভিং, 2-চাকার মোটরচালিত যানবাহন বা একাধিক অবস্থানের মধ্যে হাঁটার জন্য রিয়েল-টাইম ট্র্যাফিক সহ দিকনির্দেশ প্রদান করুন।
রুট ম্যাট্রিক্স প্রয়োজন? আপনি যদি একটি রুট ম্যাট্রিক্সে আগ্রহী হন, তাহলে কম্পিউট রুট ম্যাট্রিক্স ওভারভিউ দেখুন।
অভিবাসন? আপনি যদি দূরত্ব ম্যাট্রিক্স এপিআই (লিগ্যাসি) থেকে স্থানান্তরিত হন, তাহলে কেন রুট এপিআই-এ মাইগ্রেট করবেন থেকে শুরু করে মাইগ্রেশন নির্দেশাবলী দেখুন।
কেন কম্পিউট রুট ব্যবহার করুন
কম্পিউট রুটের সাহায্যে, বিস্তৃত রুটের বিবরণ সহ আপনি খরচ এবং গুণমানের জন্য অপ্টিমাইজ করার সময় আপনার পছন্দ অনুযায়ী আপনার যানবাহন বা প্যাকেজগুলিকে রুট করতে পারেন।
আপনি কম্পিউট রুট দিয়ে কি করতে পারেন?
Routes API Compute Routes
পদ্ধতির সাহায্যে আপনি নিম্নলিখিত কাজগুলো করতে পারেন:
ভ্রমণের বিভিন্ন উপায় এবং একক বা একাধিক গন্তব্যের জন্য দিকনির্দেশ পান :
পরিবহনের পদ্ধতি: ট্রানজিট, ড্রাইভিং, দুই চাকার যানবাহন, হাঁটা বা সাইকেল চালানো।
ওয়েপয়েন্টগুলির একটি সিরিজ যা আপনি সবচেয়ে কার্যকরী অর্ডারের জন্য অপ্টিমাইজ করতে পারেন যাতে সেগুলিতে ভ্রমণ করা যায়৷
উৎপত্তিস্থল, গন্তব্যস্থল এবং পথপয়েন্ট নির্দিষ্ট করতে একাধিক উপায় ব্যবহার করুন :
টেক্সট স্ট্রিং। উদাহরণস্বরূপ: "শিকাগো, আইএল", "ডারউইন, এনটি, অস্ট্রেলিয়া", "1800 অ্যাম্ফিথিয়েটার পার্কওয়ে, মাউন্টেন ভিউ, CA 94043", বা "CWF6+FWX মাউন্টেন ভিউ, ক্যালিফোর্নিয়া"
আইডি রাখুন
অক্ষাংশ এবং দ্রাঘিমাংশ স্থানাঙ্ক, ঐচ্ছিকভাবে গাড়ির শিরোনাম সহ
আপনার প্রয়োজন এবং লক্ষ্যগুলির উপর ভিত্তি করে আপনার রুট বিকল্পগুলিকে সূক্ষ্ম সুর করুন :
ফিল্ড মাস্ক ব্যবহার করে শুধুমাত্র আপনার প্রয়োজনীয় ডেটার অনুরোধ করে আপনার বিলম্ব এবং গুণমান নিয়ন্ত্রণ করুন , যা আপনাকে অপ্রয়োজনীয় প্রক্রিয়াকরণের সময় এবং উচ্চতর অনুরোধের বিলিং হার এড়াতে সহায়তা করে। বিশদ বিবরণের জন্য, কোন তথ্য ফেরত দিতে হবে তা চয়ন করুন দেখুন৷
কিভাবে কম্পিউট রুট কাজ করে
Routes API ComputeRoutes
পদ্ধতি একটি JSON অনুরোধ বডি সহ একটি HTTP POST অনুরোধ গ্রহণ করে যাতে অনুরোধের বিবরণ থাকে। একটি উত্স, গন্তব্য, travelMode
এবং কোন ক্ষেত্রগুলি ফেরত দিতে হবে তা নির্দিষ্ট করার জন্য একটি ফিল্ড মাস্ক প্রয়োজন৷
উদাহরণ
curl -X POST -d '{
"origin": {
"address": "1800 Amphitheatre Parkway, Mountain View, CA 94043"
},
"destination": {
"address": "Sloat Blvd &, Upper Great Hwy, San Francisco, CA 94132"
},
"travelMode": "DRIVE"
}' \
-H 'Content-Type: application/json' -H 'X-Goog-Api-Key: YOUR_API_KEY' \
-H 'X-Goog-FieldMask: routes.duration,routes.distanceMeters' \
'https://routes.googleapis.com/directions/v2:computeRoutes'
পরিষেবাটি তারপরে অনুরোধ করা রুট গণনা করে এবং আপনার অনুরোধ করা ক্ষেত্রগুলি ফেরত দেয়।
সম্পদ
নিম্নলিখিত সারণীটি রুট এপিআই কম্পিউট রুট পদ্ধতির মাধ্যমে উপলব্ধ সংস্থানগুলির সংক্ষিপ্তসার করে, সাথে এটি যে ডেটা প্রদান করে।
ডেটা সম্পদ | ডেটা ফিরে এসেছে | রিটার্ন ফরম্যাট |
---|
কম্পিউটার রুট | অনুরোধ করা হলে বিকল্প রুট সহ রুট, পা এবং একটি রুটের জন্য ধাপগুলি ফেরত দেয়। | JSON |
কিভাবে কম্পিউট রুট ব্যবহার করবেন
উপলব্ধ ক্লায়েন্ট লাইব্রেরি
কম্পিউট রুটের জন্য উপলব্ধ ক্লায়েন্ট লাইব্রেরির তালিকার জন্য, ক্লায়েন্ট লাইব্রেরি দেখুন।
এরপর কি
অন্য কিছু উল্লেখ না করা থাকলে, এই পৃষ্ঠার কন্টেন্ট Creative Commons Attribution 4.0 License-এর অধীনে এবং কোডের নমুনাগুলি Apache 2.0 License-এর অধীনে লাইসেন্স প্রাপ্ত। আরও জানতে, Google Developers সাইট নীতি দেখুন। Java হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-06-20 UTC-তে শেষবার আপডেট করা হয়েছে।
[null,null,["2025-06-20 UTC-তে শেষবার আপডেট করা হয়েছে।"],[],[],null,["# Compute Routes Overview\n\n**European Economic Area (EEA) developers** If your billing address is in the European Economic Area, effective on 8 July 2025, the [Google Maps Platform EEA Terms of Service](https://cloud.google.com/terms/maps-platform/eea) will apply to your use of the Services. Functionality varies by region. [Learn more](/maps/comms/eea/faq).\n\n[](/maps/documentation/routes/demo)\n\nIntroduction\n------------\n\nCompute Routes is a method in the Routes API service that accepts\nan HTTPS request and returns the ideal route between two locations.\nProvide directions with real-time traffic for transit, biking, driving,\n2-wheel motorized vehicles, or walking between multiple locations.\n\n**Need Route Matrixes?** If you are interested in a route matrix, see\n[Compute Route Matrix Overview](/maps/documentation/routes/compute-route-matrix-over).\n\n**Migrating?** If you are migrating from the Distance Matrix API (Legacy),\nsee migration instructions starting with\n[Why migrate to the Routes API](/maps/documentation/routes/migrate-routes-why).\n\nWhy use Compute Routes\n----------------------\n\nWith Compute Routes, with a wide\nrange of route details you can route your vehicles or packages according to\nyour preferences while optimizing for cost and quality.\n\nWhat you can do with Compute Routes?\n------------------------------------\n\nWith the Routes API `Compute Routes` method, you can\ndo the following things:\n\n- **Get directions for different ways to travel**, and for a single or\n multiple destinations:\n\n - Modes of transportation: transit, driving, two-wheel vehicles,\n walking, or bicycling.\n\n - A series of waypoints that you can optimize for the most efficient\n order in which to travel to them.\n\n- **Use multiple ways to specify origins, destinations, and waypoints**:\n\n - Text strings. For example: \"Chicago, IL\", \"Darwin, NT, Australia\", \"1800\n Amphitheatre Parkway, Mountain View, CA 94043\", or \"CWF6+FWX Mountain\n View, California\"\n\n - Place IDs\n\n - Latitude and longitude coordinates, optionally with vehicle heading\n\n- **Fine-tune your route options** based on your needs and goals:\n\n - Select fuel or energy-efficient routes for your vehicle's engine type:\n Diesel, Electric, Hybrid, Gas. For more information, see\n [Get an eco-friendly route](/maps/documentation/routes/eco-routes#request_an_eco-friendly_route).\n\n - Set fine-grained options for traffic calculation, letting you make\n quality versus latency trade off decisions. For details, see\n [Specify how and if to include traffic data](/maps/documentation/routes/config_trade_offs).\n\n - Set vehicle heading (direction of travel) and side-of-road information\n for waypoints to increase ETA accuracy. For details, see\n [Specify vehicle heading and side of road](/maps/documentation/routes/location_modifiers).\n\n - Specify pass-through versus terminal locations and safe stopover\n locations. For details, see [Set a stop along a route](/maps/documentation/routes/stop_over) and\n [Set a point for a route to pass through](/maps/documentation/routes/pass-through).\n\n - Request toll information, along with route distance and ETA. For\n details, see\n [Calculate toll fees for a route](/maps/documentation/routes/calculate_toll_fees).\n\n- **Control your latency and quality** by requesting only the data you need\n using a field mask, which helps you avoid unnecessary processing time and\n higher request billing rates. For details, see\n [Choose what information to return](/maps/documentation/routes/choose_fields).\n\nHow Compute Routes works\n------------------------\n\nThe Routes API `ComputeRoutes` method accepts an HTTP POST request with\na JSON request body that contains the request details. Required are an origin,\ndestination, `travelMode`, and a field mask to specify which fields to return. \n\n#### Example\n\n```json\ncurl -X POST -d '{\n \"origin\": {\n \"address\": \"1800 Amphitheatre Parkway, Mountain View, CA 94043\"\n },\n \"destination\": {\n \"address\": \"Sloat Blvd &, Upper Great Hwy, San Francisco, CA 94132\"\n },\n \"travelMode\": \"DRIVE\"\n }' \\\n -H 'Content-Type: application/json' -H 'X-Goog-Api-Key: YOUR_API_KEY' \\\n -H 'X-Goog-FieldMask: routes.duration,routes.distanceMeters' \\\n 'https://routes.googleapis.com/directions/v2:computeRoutes'\n```\n\nThe service then calculates the requested route, and returns the fields you've\nrequested.\n\n### Resources\n\nThe following table summarizes the resources available through the\nRoutes API Compute Routes method,\nalong with the data it returns.\n\n\u003cbr /\u003e\n\n| Data resources | Data returned | Return format |\n|----------------------------------------------------------------------|-----------------------------------------------------------------------------------|---------------|\n| [ComputeRoutes](/maps/documentation/routes/compute_route_directions) | Returns routes, legs, and steps for a route, with alternate routes, if requested. | JSON |\n\n\u003cbr /\u003e\n\n### How to use Compute Routes\n\n|---|---------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| 1 | **Get set up** | Start with [Set up your Google Cloud project](/maps/documentation/routes/cloud-setup) and complete the setup instructions that follow. |\n| 2 | **Understand how the Routes API bills** | For information, see [Usage and billing](/maps/documentation/routes/usage-and-billing). |\n| 3 | **Compute a route and review the response** | For more information, see [Get a route](/maps/documentation/routes/compute_route_directions) and [Review the route responses](/maps/documentation/routes/understand-route-response). |\n\n### Available client libraries\n\nFor a list of the available client libraries for\nCompute Routes, see\n[Client libraries](/maps/documentation/routes/client-libraries).\n\nWhat's next\n-----------\n\n- [Get a route](/maps/documentation/routes/compute_route_directions)\n- [Available route options](/maps/documentation/routes/route-opt)\n- [Choose what information to return](/maps/documentation/routes/choose_fields)\n- [Migrate from Directions API (Legacy)](/maps/documentation/routes/migrate-routes)\n- [Migrate from the Routes API preview to GA](/maps/documentation/routes/migrate-routes-preview)"]]