با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
روش renderVideo درخواست تولید یک ویدیوی نمای هوایی برای آدرس پستی مشخص شده ایالات متحده می کند. اگر ویدیو از قبل برای آدرس مشخص شده وجود داشته باشد، این روش ابرداده مربوط به ویدیو را برمی گرداند.
نحوه استفاده از API
همانطور که در مثال زیر نشان داده شده است، با ارسال یک درخواست HTTPS POST به نقطه پایانی renderVideo ، ارسال کلید API و آدرس پستی ایالات متحده، یک ویدیوی هوایی جدید ایجاد کنید. فرآیند رندر می تواند از یک ساعت تا چند ساعت طول بکشد.
فرآیند رندر می تواند از یک ساعت تا چند ساعت طول بکشد. If the video is still processing, you can use lookupVideo to poll the video status until it returns a state of ACTIVE .
برای نظرسنجی، با عبور از videoId ، درخواستی برای lookupVideo ارائه دهید. رندرینگ میتواند چندین ساعت طول بکشد، بنابراین برای فاصله گرفتن از تماسهایتان ، از عقبنشینی نمایی استفاده کنید.
پاسخ فعال
وقتی renderVideo مقدار stateACTIVE را برمیگرداند، به این معنی است که رندر ویدیو به پایان رسیده است و میتوانید با فراخوانی lookupVideo با videoId آن را بازیابی کنید.
تاریخ آخرین بهروزرسانی 2025-01-13 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","easyToUnderstand","thumb-up"],["مشکلم را برطرف کرد","solvedMyProblem","thumb-up"],["غیره","otherUp","thumb-up"]],[["اطلاعاتی که نیاز دارم وجود ندارد","missingTheInformationINeed","thumb-down"],["بیشازحد پیچیده/ مراحل بسیار زیاد","tooComplicatedTooManySteps","thumb-down"],["قدیمی","outOfDate","thumb-down"],["مشکل ترجمه","translationIssue","thumb-down"],["مشکل کد / نمونهها","samplesCodeIssue","thumb-down"],["غیره","otherDown","thumb-down"]],["تاریخ آخرین بهروزرسانی 2025-01-13 بهوقت ساعت هماهنگ جهانی."],[[["\u003cp\u003eThe \u003ccode\u003erenderVideo\u003c/code\u003e method generates aerial view videos for US postal addresses, returning metadata if the video already exists.\u003c/p\u003e\n"],["\u003cp\u003eTo generate a new video, make an HTTPS POST request to the \u003ccode\u003erenderVideo\u003c/code\u003e endpoint with your API key and the US postal address.\u003c/p\u003e\n"],["\u003cp\u003eThe rendering process can take up to a few hours, and the response provides a \u003ccode\u003evideoId\u003c/code\u003e for retrieving the video using \u003ccode\u003elookupVideo\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eWhen the video is ready, \u003ccode\u003erenderVideo\u003c/code\u003e or \u003ccode\u003elookupVideo\u003c/code\u003e will return a state of \u003ccode\u003eACTIVE\u003c/code\u003e, indicating it's available for retrieval.\u003c/p\u003e\n"],["\u003cp\u003eAn invalid address or one outside the US will result in an error response.\u003c/p\u003e\n"]]],[],null,["The\n[`renderVideo`](/maps/documentation/aerial-view/reference/rest/v1/videos/renderVideo)\nmethod requests the generation of an aerial view video for the specified US\npostal address. If the video already exists for the specified address, then this\nmethod returns metadata about the video.\n| **Note:** This usage of `renderVideo` assumes that Google hasn't already generated the aerial view video that you need. That is, you need to generate a new aerial view video.\n\nHow to use the API\n\nGenerate a new aerial video by making an HTTPS POST request to the\n[`renderVideo`](/maps/documentation/aerial-view/reference/rest/v1/videos/renderVideo)\nendpoint, passing your [API Key](/maps/documentation/aerial-view/get-api-key) and a US postal address, as shown\nin the following example. The rendering process can take anywhere from an hour\nto a few hours.\n**Note:** There is no charge for using this endpoint. \n\n```json\ncurl -X POST -d '{\n \"address\": \"\u003cvar translate=\"no\"\u003ePOSTAL_ADDRESS\u003c/var\u003e\"\n}' \\\n-H 'Content-Type: application/json' \\\n\"https://aerialview.googleapis.com/v1/videos:renderVideo?key=\u003cvar translate=\"no\"\u003eYOUR_API_KEY\u003c/var\u003e\"\n```\n\nExample request\n\nThe following code example requests the generation of an aerial view video for\n500 W 2nd St, Austin, TX, 78701. \n\n```json\ncurl -X POST -d '{\n \"address\": \"500 W 2nd St, Austin, TX 78701\"\n}' \\\n-H 'Content-Type: application/json' \\\n\"https://aerialview.googleapis.com/v1/videos:renderVideo?key=\u003cvar translate=\"no\"\u003eYOUR_API_KEY\u003c/var\u003e\"\n```\n\nExample response\n\nThe following JSON code samples show the possible responses to the example video\nrequest.\n\nInvalid address response\n\nThe address is either incorrect, or it isn't within the United States. \n\n {\n \"error\": {\n \"code\": 400,\n \"message\": \"Address not supported.\",\n \"status\": \"INVALID_ARGUMENT\"\n }\n }\n\nProcessing response\n\nThe Aerial View API is now rendering your video. The response contains the\n`videoId`, which you can use to retrieve the video. \n\n {\n \"state\": \"PROCESSING\",\n \"metadata\": {\n \"videoId\": \"x89iJAJi1wzs7DIAFQF7Va\"\n }\n }\n\nThe rendering process can take anywhere from an hour to a few hours. If the\nvideo is still processing, you can use `lookupVideo` to poll the video status\nuntil it returns a state of `ACTIVE`.\n\nTo poll, make a request to `lookupVideo`, passing the `videoId`. Rendering can\ntake several hours, so use [exponential\nbackoff](/maps/documentation/aerial-view/web-api-best-practices#exponential-backoff) to space out your calls.\n\nActive response\n\nWhen `renderVideo` returns a `state` value of `ACTIVE`, it means the video has\nfinished rendering, and you can retrieve it by calling `lookupVideo` with the\n`videoId`. \n\n {\n \"state\": \"ACTIVE\",\n \"metadata\": {\n \"videoId\": \"x89iJAJi1wzs7DIAFQF7Va\"\n }\n }"]]