gpt4 book ai didi

javascript - 如何使用Google Map Api调用v3.0来存储 "see inside"

转载 作者:行者123 更新时间:2023-12-03 12:25:59 25 4
gpt4 key购买 nike

我开发基于 map 的搜索应用程序已经有一段时间了,现在我希望添加查看商店内部的功能。

一些公共(public)商店,例如:

https://www.google.co.uk/maps/@51.508647,-0.132101,3a,75y,217.99h,72.44t/data=!3m5!1e1!3m3!1s4Z0cuVrIU3IAAAQW_jIaYQ!2e0!3e2

使用此示例可以将 View 更改为街景 View 的功能:

https://developers.google.com/maps/documentation/javascript/examples/streetview-service

我们如何使用 Google Map API 调用将当前 map View 更改为预先确定的“查看内部”热点?

最佳答案

我设法找到了解决方案,以下是资源:

http://jsfiddle.net/edwardgolduk/aWLut/

panoramaService.getPanoramaById('iJ8MuM4GeoL0nmlSLSUqNA', function (res, stat) {
var loc = res.location.latLng;
var panoramaOptions = {
position: loc,
pov: {
heading: 270,
pitch: 0
},
visible: true
};
var panorama1 = new google.maps.StreetViewPanorama(document.getElementById('pano1'), panoramaOptions);
document.getElementById('pano1_info').innerHTML = res.location.pano;
panorama1.setPano(res.location.pano);
// alert(loc.lat()+','+loc.lng());
});
var loc2 = new google.maps.LatLng(51.512272, -0.120981);
panoramaService.getPanoramaByLocation(
loc2,
25,

https://developers.google.com/maps/documentation/javascript/streetview#StreetViewService

您可以使用 LAT 和 LONG - 它将检测最近的全景图

或者您可以指定全景 ID

关于javascript - 如何使用Google Map Api调用v3.0来存储 "see inside",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24207545/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com