Method: photo.update
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
更新 Photo 的元数据,例如姿势、地点关联、连接等。不支持更改照片的像素。
仅使用 updateMask 字段中指定的字段。如果未提供 updateMask,则更新将应用于所有字段。
此方法会返回以下错误代码:
HTTP 请求
PUT https://streetviewpublish.googleapis.com/v1/photo/{photo.photoId.id}
网址采用 gRPC 转码语法。
路径参数
| 参数 |
photo.photoId.id |
string
照片的唯一标识符。
|
查询参数
| 参数 |
updateMask |
string (FieldMask format)
必需。用于标识要更新的照片元数据中的字段的掩码。如果未提供,则此请求中的新 Photo 元数据将完全替换旧 Photo 元数据。如果指定了无效字段,更新会失败。您可以在以英文逗号分隔的列表中指定多个字段。 以下字段有效:
pose.heading
pose.lat_lng_pair
pose.pitch
pose.roll
pose.level
pose.altitude
connections
places
注意:如果 updateMask 包含重复字段,则整个重复值集会被新内容替换。例如,如果 updateMask 包含 connections 且 UpdatePhotoRequest.photo.connections 为空,则所有连接都会被移除。
|
响应正文
如果成功,则响应正文包含一个 Photo 实例。
授权范围
需要以下 OAuth 范围:
https://www.googleapis.com/auth/streetviewpublish
如需了解详情,请参阅 OAuth 2.0 Overview。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-11-20。
[[["易于理解","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"]],["最后更新时间 (UTC):2025-11-20。"],[],["This describes how to update a photo's metadata using the Street View Publish API. It uses a `PUT` request to a specific URL with a photo ID in the path. The `updateMask` query parameter specifies which metadata fields to modify. The request body contains the new metadata, and the response body returns the updated photo. Key metadata includes pose, connections, and places. Authorization requires a specific OAuth scope. Possible errors include permission, invalid argument, not found, or unavailability.\n"]]