metadata.getMetadata
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
يعرض البيانات الوصفية للملف نظرًا لمعرّف الموارد المنتظم (URI) الخاص به. رأس الصورة
يسرد حقلي Exif وXMP. تم إيقاف هذا الأمر نهائيًا في المستوى 2 من واجهة برمجة التطبيقات.
المعلمات
- fileUri: معرّف الموارد المنتظم (URI) للملف المستهدف. تقرر الشركات المصنِّعة ما إذا
استخدام معرفات موارد منتظمة (URI) مطلقة أو نسبية. وقد يتعامل العملاء مع هذا المعرّف على أنّه معرّف مبهم.
النتائج
- البيانات الوصفية: بيانات Exif (بما في ذلك معلومات GPS) وPhotograph XMP في
تنسيق JSON. لا تتضمن الصورة أو الصورة المصغّرة.
الأخطاء
- مَعلمة غير متوفّرة: لم يتم تحديد السمة
fileUri
.
- spamparamName: لم يتم التعرُّف على اسم معلَمة الإدخال.
- invalidParameterValue: يتم التعرف على معلَمة الإدخال، ولكن
القيمة غير صالحة؛ على سبيل المثال،
fileUri
غير موجودة أو بياناتها
النوع غير صحيح.
مفتاح Command 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."
}
} |
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 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.\" } } ``` |"]]