AI-generated Key Takeaways
-
photo.create
publishes a 360 photo to Street View on Google Maps after it's been uploaded using an UploadRef. -
Currently, heading, pitch, and roll can only be set through Photo Sphere XMP metadata within the photo itself.
-
This method may return errors if the request is malformed, photo isn't 360, upload reference is invalid, or storage limit is reached.
-
Requires
https://www.googleapis.com/auth/streetviewpublish
OAuth scope for authorization. -
Uses a POST request to
https://streetviewpublish.googleapis.com/v1/photo
with the Photo details in the request body.
After the client finishes uploading the photo with the returned UploadRef
, photo.create
publishes the uploaded Photo
to Street View on Google Maps.
Currently, the only way to set heading, pitch, and roll in photo.create is through the Photo Sphere XMP metadata in the photo bytes. photo.create ignores the pose.heading
, pose.pitch
, pose.roll
, pose.altitude
, and pose.level
fields in Pose.
This method returns the following error codes:
google.rpc.Code.INVALID_ARGUMENT
if the request is malformed or if the uploaded photo is not a 360 photo.google.rpc.Code.NOT_FOUND
if the upload reference does not exist.google.rpc.Code.RESOURCE_EXHAUSTED
if the account has reached the storage limit.
HTTP request
POST https://streetviewpublish.googleapis.com/v1/photo
The URL uses gRPC Transcoding syntax.
Request body
The request body contains an instance of Photo
.
Response body
If successful, the response body contains a newly created instance of Photo
.
Authorization scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/streetviewpublish
For more information, see the OAuth 2.0 Overview.