camera.get 中繼資料
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
根據 URI 傳回檔案中繼資料。圖片標題
會列出 EXIF 和 XMP 欄位。這個指令已在 API 級別 2 中淘汰。
參數
- fileUri:目標檔案的 URI。製造商可自行決定
使用絕對或相對 URI用戶端可能會將此 ID 視為不透明 ID。
結果
- metadata:EXIF (包括 GPS 資訊)、Photo3 XMP 圖像
YAML 或 JSON 格式不含圖片或縮圖。
錯誤
- missingParameter:未指定
fileUri
。
- INVALIDParameterName:無法辨識輸入參數名稱。
- invalidParameterValue::系統會辨識輸入參數,但其
的值無效;例如
fileUri
不存在或其資料
類型不正確。
指令 I/O |
指令輸入 |
{
"parameters": {
"fileUri": "file URI"
}
} |
指令輸出 |
{
"results": {
"exif": {
...
"ImageWidth": 2000,
"ImageLength": 1000,
...
},
"xmp": {
"ProjectionType": "equirectangular",
"UsePanoramaViewer": true,
...
}
}
} |
指令輸出 (錯誤) |
{
"error": {
"code": "invalidParameterValue",
"message": "Parameter fileUri doesn't exist."
}
} |
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-08-21 (世界標準時間)。
[null,null,["上次更新時間:2024-08-21 (世界標準時間)。"],[[["\u003cp\u003eReturns file metadata such as Exif and XMP data for a given file URI.\u003c/p\u003e\n"],["\u003cp\u003eThis command is deprecated and was previously used in API level 2.\u003c/p\u003e\n"],["\u003cp\u003eImportant parameters include the \u003ccode\u003efileUri\u003c/code\u003e, which specifies the location of the target file.\u003c/p\u003e\n"],["\u003cp\u003ePotential errors encompass missing or invalid parameters, including an invalid or non-existent \u003ccode\u003efileUri\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe command output provides Exif and Photo Sphere XMP data in JSON format if successful.\u003c/p\u003e\n"]]],["This command retrieves a file's metadata using its URI. It's deprecated in API level 2. Input requires a `fileUri`. The output provides Exif data (including GPS) and Photo Sphere XMP in JSON format, excluding the image itself. Possible errors include a missing or invalid `fileUri`, or an unrecognized parameter name. Example input shows providing a file URI, with successful output including `exif` and `xmp` fields, and error output shown when a file URI does not exist.\n"],null,["# camera.getMetadata\n\nReturns file metadata given its URI. The [image header](/streetview/open-spherical-camera/reference/header)\nlists the Exif and XMP fields. **This command was deprecated in API level 2.**\n\nParameters\n----------\n\n- **fileUri:** URI of the target file. Manufacturers decide whether to use absolute or relative URIs. Clients may treat this as an opaque identifier.\n\nResults\n-------\n\n- **metadata:** Exif (including GPS information), Photo Sphere XMP in JSON format. Does not include image or thumbnail.\n\nErrors\n------\n\n- **missingParameter:** `fileUri` is not specified.\n- **invalidParameterName:** The input parameter name is unrecognized.\n- **invalidParameterValue:** The input parameter is recognized, but its value is invalid; for example, the `fileUri` doesn't exist, or its data type is incorrect.\n\n| Command I/O ----------- ||\n|----------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| **Command Input** | ```text { \"parameters\": { \"fileUri\": \"file URI\" } } ``` |\n| **Command Output** | ```text { \"results\": { \"exif\": { ... \"ImageWidth\": 2000, \"ImageLength\": 1000, ... }, \"xmp\": { \"ProjectionType\": \"equirectangular\", \"UsePanoramaViewer\": true, ... } } } ``` |\n| **Command Output (Error)** | ```text { \"error\": { \"code\": \"invalidParameterValue\", \"message\": \"Parameter fileUri doesn't exist.\" } } ``` |"]]