1

I'm trying to publish multilevel shoot using Street View Publish API but levels are not showing on Google map.

I have sent this below python request for Upload the metadata of the photo:

Request for level 1:

metadata_upload_url = "https://streetviewpublish.googleapis.com/v1/photo?key={}".format(API_KEY)
    headers = {"Authorization": "Bearer {}".format(ACCESS_KEY), "Content-Length": "0",
               "Content-Type": "application/json"}
    data = {

        "uploadReference": {
            "uploadUrl": "https://streetviewpublish.googleapis.com/media/user/100547264652003378315/photo/5844140439745949662"
        },
        "pose": {
            "latLngPair": {
                "latitude": 18.51314,
                "longitude": 73.85670
            },
            "heading": 0.0,
            "pitch": 0.0,
            "level": {
                "number": 1,
                "name": "arr"
            }
        },

        "places": [{
            "placeId": "ChIJb3sWh27AwjsRkiAc5rqoVvs",
        }],
    }
    meta_photo_request = requests.post(metadata_upload_url, json=data, headers=headers)
    photoid = meta_photo_request.json()['photoId']['id']

Request for level 2:

metadata_upload_url = "https://streetviewpublish.googleapis.com/v1/photo?key={}".format(API_KEY)
        headers = {"Authorization": "Bearer {}".format(ACCESS_KEY), "Content-Length": "0",
                   "Content-Type": "application/json"}
        data = {

            "uploadReference": {
                "uploadUrl": "https://streetviewpublish.googleapis.com/media/user/100547264652003378315/photo/5844140439745949662"
            },
            "pose": {
                "latLngPair": {
                    "latitude": 18.51315,
                    "longitude": 73.85671
                },
                # "altitude": 500,
                "heading": 0.0,
                "pitch": 0.0,
                "level": {
                    "number": 2,
                    "name": "brr"
                }
            },

            "places": [{
                "placeId": "ChIJb3sWh27AwjsRkiAc5rqoVvs",
            }],
        }
        meta_photo_request = requests.post(metadata_upload_url, json=data, headers=headers)
        photoid = meta_photo_request.json()['photoId']['id']  

Result with status 200

{
  "results": [
    {
      "status": {
        "code": 200
      },
      "photo": {
        "photoId": {
          "id": "CAoSLEFGMVFpcE5UOXQzcDBwa0kwTGVROG81Nm1Qc05HdFo4djROUjB4YXM0UGNf"
        },
        "pose": {
          "latLngPair": {
            "latitude": 18.51315,
            "longitude": 73.856709999999993
          },
          "altitude": "NaN",
          "pitch": "NaN",
          "roll": "NaN",
          "level": {}
        },
        "connections": [
          {
            "target": {
              "id": "CAoSLEFGMVFpcE9VaEpXRU03SWZod0dkdFVJUDgwNHhsY0p2YWktcTVldHVmZ0ZV"
            }
          }
        ],
        "captureTime": "2017-07-27T00:00:00Z",
        "places": [
          {
            "placeId": "ChIJb3sWh27AwjsRkiAc5rqoVvs"
          }
        ],
        "thumbnailUrl": "https://lh3.googleusercontent.com/p/AF1QipNT9t3p0pkI0LeQ8o56mPsNGtZ8v4NR0xas4Pc_=-no",
        "viewCount": "7",
        "shareLink": "https://www.google.com/maps/@18.51315,73.85671,0a,75y/data=!3m6!1e1!3m4!1s-W7huarDveuA%2FWXnJ6zKkzAI%2FAAAAAAAAia8%2FhTVrH8aZO54yds7DERdBRcwHUvgzg_6BACLIBGAYYCw!2e4!3e11!6s%2F%2Flh3.googleusercontent.com%2F-W7huarDveuA%2FWXnJ6zKkzAI%2FAAAAAAAAia8%2FhTVrH8aZO54yds7DERdBRcwHUvgzg_6BACLIBGAYYCw%2Fno%2Fphoto.jpg"
      }
    },


    {
      "status": {
        "code": 200
      },
      "photo": {
        "photoId": {
          "id": "CAoSLEFGMVFpcE9VaEpXRU03SWZod0dkdFVJUDgwNHhsY0p2YWktcTVldHVmZ0ZV"
        },
        "pose": {
          "latLngPair": {
            "latitude": 18.51314,
            "longitude": 73.8567
          },
          "altitude": "NaN",
          "pitch": "NaN",
          "roll": "NaN",
          "level": {}
        },
        "connections": [
          {
            "target": {
              "id": "CAoSLEFGMVFpcE5UOXQzcDBwa0kwTGVROG81Nm1Qc05HdFo4djROUjB4YXM0UGNf"
            }
          }
        ],
        "captureTime": "2017-07-27T00:00:00Z",
        "places": [
          {
            "placeId": "ChIJb3sWh27AwjsRkiAc5rqoVvs"
          }
        ],
        "thumbnailUrl": "https://lh3.googleusercontent.com/p/AF1QipOUhJWEM7IfhwGdtUIP804xlcJvai-q5etufgFU=-no",
        "viewCount": "8",
        "shareLink": "https://www.google.com/maps/@18.51314,73.8567,0a,75y/data=!3m6!1e1!3m4!1s-huvo4fBlnjw%2FWXnJARb4q7I%2FAAAAAAAAia0%2FJDjPyYRA2L8S4n48xtakPUSglymSICRIACLIBGAYYCw!2e4!3e11!6s%2F%2Flh3.googleusercontent.com%2F-huvo4fBlnjw%2FWXnJARb4q7I%2FAAAAAAAAia0%2FJDjPyYRA2L8S4n48xtakPUSglymSICRIACLIBGAYYCw%2Fno%2Fphoto.jpg"
      }
    }
  ]
}  

In the result, level object is empty while I have put the level name and number. I'm not getting why it is showing empty.

Can anyone tellme about what step should be follow for publish the multilevel shoot on Google map?

Manish
  • 83
  • 1
  • 9

1 Answers1

0

You need to make sure that all photos are very close to each other (~5m) to make the levels control show up. You could try to send the levels data with a separate photo.update call. Don't forget to use the correct updateMask.

Thomas
  • 514
  • 4
  • 14
  • Yeah I have already published all the photos which are very close to each other but levels are not showing on Google map.For testing, I have published 2 connected panos on level 1 and and 2 connected panos on level 2. – Manish Jul 27 '17 at 19:47
  • I updated my answer. I use a two step process. I first upload all images and then I use a batchUpdate to set all the connection and levels data. – Thomas Jul 28 '17 at 14:03
  • Hey @Thomas Rauscher I have used separate photo.update method for levels. In the result I'm getting the levels value but levels aren't showing on Google map. Any help would be appreciated. – Manish Jul 29 '17 at 04:06
  • Do they show now? Sometimes it takes 24hrs before the elevator control shows up, and it only shows if at this photo there is another photo with a different level in a ~5m range. – Thomas Jul 31 '17 at 08:00
  • In addition to @Thomas Rauscher's answer, be noted that there should have an existing indoor map in your latitude/longitude (where your panoramas are taken). You may check this [guideline](https://support.google.com/maps/answer/2803784?co=GENIE.Platform%3DDesktop&hl=en) on how to upload a floor plan to Google Maps. – abielita Jul 31 '17 at 11:08
  • Is street view publish API strictly require floor plan for multi-level? @abielita – Manish Aug 09 '17 at 12:51
  • AFAIK, you cannot upload a multi-level pictures if the area doesn't have a floor plan. – abielita Aug 14 '17 at 09:13
  • @abielita You can post a multi level tour anywhere, as long as the photos are close to each other. – Thomas Aug 15 '17 at 12:28