嵌入谷歌街景
是否可以在您的页面中嵌入给定地址的谷歌地图街景全景?
我遇到的所有代码都与协调一起工作,我正在寻找“地址”,因为如果你只使用协调,你将不得不设置 pov 和所有这些,
谷歌似乎自己这样做,看看这里的全景图片:
<一href="http://maps.google.ca/maps/place?hl=en&sugexp=kjrmc&cp=10&gs_id=z&xhr=t&biw=1680&bi h=874&gs_upl=&bav=on.2,or.r_gc.r_pw.,cf.osb&um=1&ie=UTF-8&q=丰田+卡尔加里&fb=1&gl=ca& hq=丰田&hnear=0x537170039f843fd5:0x266d3bb1b652b63a,卡尔加里,+AB&cid=16440335169618939517&ei=VpqY TpPsLbCrsALi0LnqBA&sa=X&oi=local_result&ct=地图标记链接&resnum=1&sqi=2&ved=0CF8QrwswAA" rel="nofollow">http://maps.google.ca/maps/place?hl=en&sugexp=kjrmc&cp=10&gs_id=z&xhr=t&biw=1680& amp;bih=874&gs_upl=&bav=on.2,or.r_gc.r_pw.,cf.osb&um=1&ie=UTF-8&q=丰田+卡尔加里&fb=1&gl= ca&hq=丰田&hnear=0x537170039f843fd5:0x266d3bb1b652b63a,卡尔加里,+AB&cid=16440335169618939517&ei=VpqY TpPsLbCrsALi0LnqBA&sa=X&oi=local_result&ct=map-marker-link&resnum=1&sqi=2&ved=0CF8QrwswAA
谢谢
Is it possible to have a google map embeded street view panorama of a given address in your page?
All the codes I have came across work with coordination, I'm looking for "address", since if you just use coordination you will have to set pov and all that,
Google seems to do that itself, look at the panorama picture here:
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
是的,使用 Google Maps Javascript API V3。请查看此处:http://code.google.com/ apis/maps/documentation/javascript/services.html#StreetView
您还可以仅使用 Google 地图在您的页面上嵌入街景视图。
将打开一个新页面,其中会打开一些自定义内容以及将地图/图像嵌入到页面上的代码。
Yes, using the Google Maps Javascript API V3. Take a look here: http://code.google.com/apis/maps/documentation/javascript/services.html#StreetView
You can also embed Street View on your page by just using Google Maps.
A new page will open up with some customization opens and the code to embed the map/image on your page.
是的,你可以。您所需要的只是一个谷歌解码器,它将解码您的地址。另一种方法是直接将您的地址作为网址的一部分传递给谷歌。
使用解码器时,您将以纬度经度对象的形式获得结果,您可以使用它来重置/设置地图的标记
Yes you can. All you need is a google decoder who will decode your address. Another way is to directly pass your address as a part of the url to google.
When using decoder, you will get the result in the form of a latitude longitude object which you can use to reset/set your map's marker
无法自动准确地设置航向,也无法设置俯仰和fov(视野) - 但如果您认为您可以手动创建一个 URL,使用这些设置从 Google 获取静态图像。
请查看 街景图片API
There is no way to accurately set the heading automatically and no way to set the pitch and fov (field of view) - BUT if you figure these out manually you can create a URL that fetches a static image with those settings from Google
Take a look at this tutorial on the Street View Image API