I'm building an app with google street view. Basically the user clicks on a road, he sees a street view box where he can change the direction of the camera and then he submits it to the server, where latitude, longitude and heading are stored.

When he reloads the page, a marker will be set in that location and when he clicks on it he will see exactly the same image but he won't be able to pan anymore (I'm using google street view image).

I noticed that when I click on a stored pin, the image loaded is not exactly the same, is it possible that google street view has some precision issues? The view has always a noticeable offset. Here's what I'm sending to the server:

latitude: 32.84094293282064 longitude: -117.23613739013672 heading: -7

truck

and here the request and the result for the static image:

http://maps.googleapis.com/maps/api/streetview?size=360x360&location=32.84094293282064,%20-117.23613739013672&fov=120&heading=-7&pitch=10&sensor=false

(click on the link to see the image)

As you can see, you still see the white truck, it's just further away, even though the latitude and the longitude are the same.

有帮助吗?

解决方案

I just stumbled on to this looking for something else and noticed it wasn't answered. You've probably either given up or figured it out by now.

My guess would be the FOV is different. You are using 120 and my best guess for the image that you have is around 90.

http://maps.googleapis.com/maps/api/streetview?size=360x360&location=32.84094293282064,%20-117.23613739013672&fov=90&heading=-7&pitch=10&sensor=false

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top