谷歌街景网址 [英] Google street view URL

查看:40
本文介绍了谷歌街景网址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个属性的地址,我的应用程序可以启动浏览器转到 http://maps.google.com?q=searchStringHere.如果找到一个好的匹配,它会直接把它带到那里.有什么我可以附加到 url 以使其在没有确切坐标的情况下切换到街景的东西吗?我不想编写任何 javascript 或 flash 代码.

Hi I have the address of a property and my application can launch a browser to go to http://maps.google.com?q=searchStringHere. If a good match is found it will take it directly there. Is there any thing I can append to the url to make it switch to streetview without having the exact coordinates? I dont't want to code any javascript or flash.

推荐答案

遗憾的是没有 - 根据地址没有简单的答案.

Unfortunately not - there's no simple answer, based on the address.

首先,参数列表此处记录了 Google 地图网站,因此您可以将其作为起点.

Firstly, the list of parameters for the Google Maps site is documented here, so you can use that as your starting point.

简单的部分是您需要选择街景图层&layer=c".

The easy part is that you need to select the streetview layer "&layer=c".

但是,在该图层中显示任何内容之前,您需要指定视图的位置.您可以通过 cbll 中的纬度和经度以及 cbp 中的一些选项设置相机的角度来设置位置.

However, before anything will display in that layer, you need to specify where your view is. You set the position by the latitude and longitude in cbll and the angle of the camera with some options in cbp.

要从地址中获取纬度和经度,您需要使用 地理编码服务,例如 谷歌地图 API.

To get the latitude and longitude from the address, you need to use a geocoding service, like the google maps api.

但是,这只会让您看到地址附近的街景.除了知道街景需要从哪里开始,您还需要知道将相机指向哪个角度 - 每个地址都会有所不同,具体取决于街景相机拍摄照片的最近点在哪里,所以自动完成并不容易(使用我知道的任何可用信息......)

However, this will only get you a street view close to the address. In addition to knowing where the street view needs to be from, you also need to know which angle to point the camera at - this will be different for every address, depending on where the nearest point the StreetView camera took a photo from was, so it's not easy to do automatically (with any information that I know is available...)

这篇关于谷歌街景网址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆