【问题标题】:Connect multiple 360 images using Google Street View Publish API [duplicate]使用 Google Street View Publish API 连接多个 360 度图像 [重复]
【发布时间】:2017-07-05 09:11:00
【问题描述】:

使用 batchUpadte 方法,我正在尝试从源图像连接多个 360 度图像。

例如下面是我对 batchUpdate 方法的 python 请求:

update_photo_url = 'https://streetviewpublish.googleapis.com/v1/photos:batchUpdate'

headers = {"Authorization": "Bearer {}".format("ya29.Glx6BO91jWbj...."), "Content-Length": "0", "Content-Type": "application/json"}

update_body = {
  "updatePhotoRequests": [
    {
      "updateMask": "connections",
      "photo": {
        "photoId": {
          "id": "image_1"
        },
        "connections": [
          {
            "target": {
              "id": "image_2"
            }
          },
          {
            "target": {
              "id": "image_3"
            }
          }
        ]
      }
    },
    {
      "updateMask": "connections",
      "photo": {
        "photoId": {
          "id": "image_3"
        },
        "connections": [
          {
            "target": {
              "id": "image_4"
            }
          }
        ]
      }
    }
  ]
}
update_response = requests.post(update_photo_url,headers=headers,json=update_body)
update_response.text  

发送此请求后,我的状态为 200 OK,但有一个问题,我有四个图像。我正在图像之间建立联系,如下所示:

image_1 -> image_2, image_3
image_3 -> image_4

使用上面的代码,我可以从 image_2 -> image_1, image_1 -> image_3, image_3 -> image_1, image_3 -> image_4 和 image_4 -> image_3 但是 为什么我不能从image_1 -> image_2

请帮我解决这个问题。谁能告诉我,我的请求有什么问题?

【问题讨论】:

    标签: python json google-api google-street-view google-streetview-publish


    【解决方案1】:

    您是否检查过移动街景应用或浏览器中的连接?浏览器有时会添加或断开连接,但我发现移动应用是查看存储在 Google 服务器上的“基本事实”的最佳方式。

    【讨论】:

    • 我已经检查了移动街景应用和浏览器中的连接,但连接不可见。
    • 是否缺少所有连接,或者只是连接 image_1 到 image_2?您是否还添加了另一个方向的连接,以便全景图双向链接?如果您发出 batchGet 请求,您看到连接了吗?
    • 如果我在桌面浏览器中打开相同的链接,则连接可见,但 image_1 -> image_2 连接除外,但如果我在街景应用程序或移动浏览器中打开相同的链接,则所有连接都丢失。
    • 有时它需要长达 24 小时才能传播,但您应该在街景应用的“编辑连接”屏幕中看到它们。 support.google.com/maps/answer/7011737?hl=en btw:你是否在应用中禁用了“自动连接”?
    • 您可以检查应用程序中的连接,看看您是否使用您的应用程序正确传输了它们。您也可以使用 batchGet 来检查传输是否正确。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-07-24
    • 1970-01-01
    • 1970-01-01
    • 2019-09-22
    • 2020-07-13
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多