Using street view publish API to upload panoramas, connections doesn't seem to work

340 Views Asked by At

We are using the Street View Publish API to upload panoramas on Street View and we have some issues with connections. After uploading all the images like mentioned in the documentation, we try to add the connections by doing a batch update. Here is the JSON of the batch Update that we are sending:

{
  "updatePhotoRequests": [
    {
      "photo": {
        "photoId": {
          "id": "CAoSLEFGMVFpcE1CSGtCNS1pbUJnQkNFTGt4eVVtZ0NFVUZaVklYTXIzeEhOREhp"
        },
        "connections": [
          {
            "target": {
              "id": "CAoSLEFGMVFpcFAyel9jZnVldTFSdkFKZzVGWlJOUEdTdnVWaEFaM3ZaN2drbUZI"
            }
          },
          {
            "target": {
              "id": "CAoSLEFGMVFpcFBCdFZGenBDN21jNExsajV1SjE0UEhQa3lDeTM1MUdRdjJTQTND"
            }
          }
        ]
      },
      "updateMask": "connections"
    },
    {
      "photo": {
        "photoId": {
          "id": "CAoSLEFGMVFpcFBCdFZGenBDN21jNExsajV1SjE0UEhQa3lDeTM1MUdRdjJTQTND"
        },
        "connections": [
          {
            "target": {
              "id": "CAoSLEFGMVFpcFAyel9jZnVldTFSdkFKZzVGWlJOUEdTdnVWaEFaM3ZaN2drbUZI"
            }
          },
          {
            "target": {
              "id": "CAoSLEFGMVFpcE1CSGtCNS1pbUJnQkNFTGt4eVVtZ0NFVUZaVklYTXIzeEhOREhp"
            }
          }
        ]
      },
      "updateMask": "connections"
    },
    {
      "photo": {
        "photoId": {
          "id": "CAoSLEFGMVFpcFAyel9jZnVldTFSdkFKZzVGWlJOUEdTdnVWaEFaM3ZaN2drbUZI"
        },
        "connections": [
          {
            "target": {
              "id": "CAoSLEFGMVFpcFBCdFZGenBDN21jNExsajV1SjE0UEhQa3lDeTM1MUdRdjJTQTND"
            }
          },
          {
            "target": {
              "id": "CAoSLEFGMVFpcE1CSGtCNS1pbUJnQkNFTGt4eVVtZ0NFVUZaVklYTXIzeEhOREhp"
            }
          }
        ]
      },
      "updateMask": "connections"
    }
  ]
}

When we go on the Mobile Street View app, we can observe that the panoramas have been uploaded but the connections between the panoramas are not present. We also noticed that the app proposes new connections and that we have to touch on the links to activate them enter image description here

Question: How can we generate connections using the API ? Are we missing other parameters?

2

There are 2 best solutions below

0
Marie-Eve On BEST ANSWER

Ok so it seems that I was trying to send my batch update request too fast. We need to wait for all the photos to be correctly uploaded before updating the connections.

1
abielita On

I've tried your sample code and I also can't generate a connection using it. I've also read in this documentation that sometimes, there is a delay on making the connections and usually it takes 24 hours to connect. You may also check this post for additional reference.