问题
I have an issue with the connection request in google street view publish API. Both with single and multiple target. If i create single target from source photo
{
"updatePhotoRequests": [
{
"updateMask": "connections",
" photo": {
"photoId": {
"id": "pano_3"
},
"connections": [
{
"target": {
"id": "pano_4"
}
},
]
}
}
]
}
How the above JSON request set Panorama connection to specific direction of the target panorama. For e.g if i set a connection from pano_1 north position to pano_2 south position its not set properly. the link arrow show to right direction rather than forward or backward direction. The following image help to understand the problem
In the above image i intended to create connection to go further but its showing the right arrow button rather than forward button.
Also same issue with multiple photos
{
"updatePhotoRequests": [
{
"updateMask": "connections",
"photo": {
"photoId": {
"id": "pano_1"
},
"connections": [
{
"target": {
"id": "pano_2"
}
},
{
"target": {
"id": "pano_3"
}
}
]
}
}
]
}
回答1:
@HarishKumar, the direction of the arrow is determined by the lat,lng and heading of each set of 2 panos which are linked. You may check this link for reference. Think of it as 2 vertices on a plane, you can move them anywhere on the plane or rotate them around their own center, but there's always only one straight line that connects them.
You need to edit the heading
of each photo that you want to connect. Example, for pano_1 with arrow pointing to right with heading:90
, your pano_2 should have a heading:270
. Be noted that you need to edit both pictures. (I've done this by trial and error.)
来源:https://stackoverflow.com/questions/44984196/how-does-street-view-publish-api-judge-the-panorama-connection-that-which-direct