2

Using batchUpadte method, I'm trying to connect multiple 360 images from the source image.

e.g. Below is my python request for batchUpdate method:

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  

After sending this request, I'm getting status 200 OK but there is one problem, I have four images. I'm making connection between images as in:

image_1 -> image_2, image_3
image_3 -> image_4

Using above code, I'm able to go from image_2 -> image_1, image_1 -> image_3, image_3 -> image_1, image_3 -> image_4 and image_4 -> image_3 but why I'm unable to go from image_1 -> image_2?

Please help me to resolve this issue. Can anybody tell, what is wrong in my request?

Menu
  • 677
  • 1
  • 12
  • 30

1 Answers1

0

Have you checked the connections in the mobile Street View app or the browser? The browser sometimes adds or looses connections, but I have found the mobile App to be the best way to see the "ground truth" that is stored on Googles servers.

Thomas
  • 514
  • 4
  • 14
  • I have checked the connections in the mobile street view app and browser also but the connections are not visible. – Menu Jul 05 '17 at 10:02
  • Are all connections missing, or just the connection image_1 to image_2? Did you also add the connections in the other direction, so that panoramas are linked both ways? Do you you see the connections if you make a batchGet request? – Thomas Jul 05 '17 at 11:29
  • If I open same link in the desktop's browser then the connections are visible except image_1 -> image_2 connection but If I open same link in the street view app or mobile browser then all the connection are missing. – Menu Jul 05 '17 at 11:34
  • Sometimes it takes up to 24h, before it propagates, but you should see them in the "edit connections" screen on the Street View app. https://support.google.com/maps/answer/7011737?hl=en btw: Have you disabled "auto connect" in the app? – Thomas Jul 05 '17 at 11:52
  • I have published tour using Google street view API not using Street view app. Already 24 hrs have been completed but still one connection is missing from desktop browser. – Menu Jul 05 '17 at 12:15
  • 1
    You can *check* the connections in the App to see if you transferred them correctly with your app. You can can also use batchGet to *check* if the transfer was correct. – Thomas Jul 05 '17 at 14:03