Method: photo.create
Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
Müşteri, döndürülen UploadRef
ile fotoğrafı yüklemeyi tamamladıktan sonra photo.create
, yüklenen Photo
'yi Google Haritalar'daki Street View'da yayınlar.
Şu anda photo.create işlevinde yön, eğim ve yuvarlanma ayarlarını yapmanın tek yolu, fotoğraf baytlarındaki Fotoğraf Küresi XMP meta verilerini kullanmaktır. photo.create işlevi, Poz'daki pose.heading
, pose.pitch
, pose.roll
, pose.altitude
ve pose.level
alanlarını yoksayar.
Bu yöntem aşağıdaki hata kodlarını döndürür:
HTTP isteği
POST https://streetviewpublish.googleapis.com/v1/photo
URL, gRPC Kod Dönüştürme söz dizimini kullanır.
İstek içeriği
İstek metni, Photo
öğesinin bir örneğini içerir.
Yanıt gövdesi
Başarılı olursa yanıt metni, yeni oluşturulmuş bir Photo
örneğini içerir.
Yetkilendirme kapsamları
Aşağıdaki OAuth kapsamını gerektirir:
https://www.googleapis.com/auth/streetviewpublish
Daha fazla bilgi için OAuth 2.0'a Genel Bakış başlıklı makaleyi inceleyin.
Aksi belirtilmediği sürece bu sayfanın içeriği Creative Commons Atıf 4.0 Lisansı altında ve kod örnekleri Apache 2.0 Lisansı altında lisanslanmıştır. Ayrıntılı bilgi için Google Developers Site Politikaları'na göz atın. Java, Oracle ve/veya satış ortaklarının tescilli ticari markasıdır.
Son güncelleme tarihi: 2025-07-25 UTC.
[null,null,["Son güncelleme tarihi: 2025-07-25 UTC."],[[["\u003cp\u003e\u003ccode\u003ephoto.create\u003c/code\u003e publishes a 360 photo to Street View on Google Maps after it's been uploaded using an UploadRef.\u003c/p\u003e\n"],["\u003cp\u003eCurrently, heading, pitch, and roll can only be set through Photo Sphere XMP metadata within the photo itself.\u003c/p\u003e\n"],["\u003cp\u003eThis method may return errors if the request is malformed, photo isn't 360, upload reference is invalid, or storage limit is reached.\u003c/p\u003e\n"],["\u003cp\u003eRequires \u003ccode\u003ehttps://www.googleapis.com/auth/streetviewpublish\u003c/code\u003e OAuth scope for authorization.\u003c/p\u003e\n"],["\u003cp\u003eUses a POST request to \u003ccode\u003ehttps://streetviewpublish.googleapis.com/v1/photo\u003c/code\u003e with the Photo details in the request body.\u003c/p\u003e\n"]]],["Clients upload a photo using `UploadRef`, then use `photo.create` to publish the `Photo` to Google Maps. Heading, pitch, and roll must be set in the Photo Sphere XMP metadata. The request URL is `POST https://streetviewpublish.googleapis.com/v1/photo`. The request body includes a `Photo` instance, and a successful response returns a created `Photo` instance. It requires the `streetviewpublish` OAuth scope and can return `INVALID_ARGUMENT`, `NOT_FOUND`, or `RESOURCE_EXHAUSTED` error codes.\n"],null,["# Method: photo.create\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nAfter the client finishes uploading the photo with the returned [UploadRef](/streetview/publish/reference/rest/v1/photo#UploadRef), [photo.create](/streetview/publish/reference/rest/v1/photo/create#google.streetview.publish.v1.StreetViewPublishService.CreatePhoto) publishes the uploaded [Photo](/streetview/publish/reference/rest/v1/photo#Photo) to Street View on Google Maps.\n\nCurrently, the only way to set heading, pitch, and roll in photo.create is through the [Photo Sphere XMP metadata](https://developers.google.com/streetview/spherical-metadata) in the photo bytes. photo.create ignores the `pose.heading`, `pose.pitch`, `pose.roll`, `pose.altitude`, and `pose.level` fields in Pose.\n\nThis method returns the following error codes:\n\n- [google.rpc.Code.INVALID_ARGUMENT](/streetview/publish/reference/rest/v1/Code#ENUM_VALUES.INVALID_ARGUMENT) if the request is malformed or if the uploaded photo is not a 360 photo.\n- [google.rpc.Code.NOT_FOUND](/streetview/publish/reference/rest/v1/Code#ENUM_VALUES.NOT_FOUND) if the upload reference does not exist.\n- [google.rpc.Code.RESOURCE_EXHAUSTED](/streetview/publish/reference/rest/v1/Code#ENUM_VALUES.RESOURCE_EXHAUSTED) if the account has reached the storage limit.\n\n### HTTP request\n\n`POST https://streetviewpublish.googleapis.com/v1/photo`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Request body\n\nThe request body contains an instance of [Photo](/streetview/publish/reference/rest/v1/photo#Photo).\n\n### Response body\n\nIf successful, the response body contains a newly created instance of [Photo](/streetview/publish/reference/rest/v1/photo#Photo).\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/streetviewpublish`\n\nFor more information, see the [OAuth 2.0 Overview](https://developers.google.com/identity/protocols/OAuth2)."]]