two different google streetviews

匆匆过客 提交于 2019-12-25 08:02:48

问题


I am getting two different streetviews, and I'm wondering if anyone can help me understand why the difference occurs.

I start on google maps and zoom into the streetview with the following URL:

https://www.google.com/maps/place/452+42+Ave+SE/@51.0445,-114.059,3a,75y,346.38h,85.83t/data=!3m4!1e1!3m2!1smwjybt0aGjulRlrUl7QyMg!2e0!4m7!1m4!3m3!1s0x53717001e51c622d:0xe4cc541a8bac14f6!2s219+9+Ave+SE!3b1!3m1!1s0x0:0x22eaf82b58b21f94

I then extract the latitude and longitude and generate the following static streetview:

https://maps.googleapis.com/maps/api/streetview?size=600x600&location=(51.0445, -114.059)&sensor=false

However, when I compare the two views they are different. Any ideas why?


回答1:


I guess you don't mean the size(of course it will differ, because static maps have a limited size )

Static maps have multiple parameters(documentation):

  1. location when I open the first link at least for me the location will be changed to 51.044463,-114.058452 .

  2. heading
    for the first link it's the parameter followed by a h : 346.38

  3. fov for the first link it's the parameter followed by a y :75

  4. pitch for the first link it's the parameter followed by a t :85.83 substract 90 from that value: -4.17

Result: https://maps.googleapis.com/maps/api/streetview?size=600x600&location=%2851.044463,-114.058452%29&heading=346.38&fov=75&pitch=-4.17&sensor=false


Result without these parameters:

Result with the parameters:


Screenshot for the first link(browserwindow resized to a viewport of 600x600)



来源:https://stackoverflow.com/questions/22979030/two-different-google-streetviews

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!