স্থানের বিবরণে স্থানান্তর করুন (নতুন)

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

ভূমিকা

Places API , Place Details (Legacy) সমর্থন করে। আপনি যদি Places API (Legacy)-এর সাথে পরিচিত হন, তাহলে Place Details (New) নিম্নলিখিত পরিবর্তনগুলি এনেছে:

  • Field masking is required. You must specify which fields you want returned in the response. There is no default list of returned fields. If you omit this list, the methods return an error. For more information, see FieldMask .
  • স্থানের বিবরণ (নতুন) প্রমাণীকরণ পদ্ধতি হিসেবে এপিআই কী এবং ওঅথ টোকেন উভয়ই সমর্থন করে।
  • প্লেস ডিটেইলস (নতুন)-এ রেসপন্স ফরম্যাট হিসেবে শুধুমাত্র JSON সমর্থিত।
  • Places API (New)-এর JSON রেসপন্স ফরম্যাটটি লিগ্যাসি API-গুলোর ফরম্যাট থেকে পরিবর্তিত হয়েছে। আরও বিস্তারিত জানতে, Places API রেসপন্স মাইগ্রেট করুন (Migrate the Places API response ) দেখুন।

নিম্নলিখিত সারণিতে প্লেস ডিটেইলস (লেগ্যাসি)-এর সেই প্যারামিটারগুলোর তালিকা দেওয়া হয়েছে, যেগুলো প্লেস ডিটেইলস (নিউ)-এর জন্য নতুন নামকরণ বা পরিবর্তন করা হয়েছে, অথবা যেগুলো এখন আর সমর্থিত নয়।

বর্তমান প্যারামিটার নতুন প্যারামিটার নোট
place_id places/ PLACE_ID The string places/ PLACE_ID is also called the place resource name . In the response from a Place Details (New), Nearby Search (New), and Text Search (New) request, this string is contained in the name field of the response. The standalone place ID is contained in the id field of the response.
language languageCode
region regionCode

উদাহরণ অনুরোধ

The following example GET request uses the Place Details (Legacy). In this example, you request a JSON response containing information about a place ID and pass all parameters as URL parameters. This example also uses fields so the response only includes the display name and formatted address of the place:

curl -L -X GET \
'https://maps.googleapis.com/maps/api/place/details/json?place_id=ChIJj61dQgK6j4AR4GeTYWZsKWw&fields=name%2Cformatted_address&key=API_KEY'

With Place Details (New), you make a GET request and pass all parameters in URL parameters and headers as part of the request. This example also uses a field mask so the response only includes the display name and formatted address of the place:

curl -X GET -H 'Content-Type: application/json' \
-H "X-Goog-Api-Key: API_KEY" \
-H "X-Goog-FieldMask: displayName,formattedAddress" \
https://places.googleapis.com/v1/places/ChIJj61dQgK6j4AR4GeTYWZsKWw

The string places/ PLACE_ID is also called the place resource name . In the response from a Place Details (New), Nearby Search (New), and Text Search (New) request, this string is contained in the name field of the response. The standalone place ID is contained in the id field of the response.