我試圖使用街景發佈API在現有照片上發佈photo.pose.level。街景視圖發佈api pose.level不會保存
當我發佈GPS,HEADING和LEVEL數據時,前兩個(GPS + HEADING)存儲在街景照片上,但LEVEL數據丟失並且不會保存(服務器響應正常)。
這裏是我的POST代碼爲標題和GPS的作品,我無法揣摩出我錯了,或者如果我失去了一些東西..我想我已經爲documentation
描述所做的一切$data['pose']['latLngPair']['latitude']=$lat+0;
$data['pose']['latLngPair']['longitude']=$lon+0;
$data['pose']['heading']=$heading+0;
$data['pose']['level']['number']=$level+0;
$data['pose']['level']['name']='L'.($level+0).'';
$data_string = json_encode($data);
$ch = curl_init('https://streetviewpublish.googleapis.com/v1/photo/'.$photo_id.'?key='.$_GOOGLE_API['api_key'].'&updateMask=pose.latLngPair,pose.heading,pose.level');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");
curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'authorization: Bearer '.$_GOOGLE_API['access_token'],
'Content-Type: application/json',
'Content-Length: ' . strlen($data_string))
);
$json_response=curl_exec($ch);
curl_close ($ch);
嘗試使用API Explorer與[**'photo.get' **](https://developers.google.com/streetview/publish/reference/rest/v1/photo/get)測試照片函數,看看它是否被正確更新。在檢查它是否正確更新時,是否使用了[**'photos.list()**](https://developers.google.com/streetview/publish/reference/rest/v1/photos/list)? –
我已經使用[**'photos.batchGet()**](https://developers.google.com/streetview/publish/reference/rest/v1/photos/batchGet)和[**'照片。獲取'**](https://developers.google.com/streetview/publish/reference/rest/v1/photo/get),並能夠看到我早些時候宣佈的pose.level(15分鐘前)。 –