Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
802 views
in Technique[技术] by (71.8m points)

google maps - Why are some street-view images from the wrong angle?

I am using the Google Street View Image API to display an image of an address. Although most of the images are amazingly accurate, I've noticed a few that are from the wrong angle like a house on the corner where the image is from the side street, not from the front street. When I check Google Maps the image that shows on the top of the left panel is correct.

Example; Below is an image using the URL parameters from the API instructions; http://maps.googleapis.com/maps/api/streetview?size=300x200&location=39.408751,-104.917738&sensor=false

enter image description here

Below is an image of the same location that displays in the left panel of Google Maps,

https://cbks0.google.com/cbk?output=thumbnail&cb_client=maps_sv&thumb=2&thumbfov=60&ll=39.408554,-104.917506&yaw=317.7&thumbpegman=1&w=300&h=118

enter image description here

Is there a way to get the "better" angle using the API?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I have been noticing that too, google seems to be using a different algorithm to display that image (in the left panel) on its site and it is more accurate as it is at the front shot of the location.

There is no direct way to get that angle with their "Street View Image API" but you can use the javascript API to calculate that angle and pass it on to the Image API.

The question here is how can we know which is front of the building?, well the front is usually where the entrance is from the street. So, you can use the DirectionService to get the nearest transportation start location which is usually the road at the entrance of the building, using this location you can now easily compute the heading using their geometry utility methods and pass this on to your Image API.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...