我在 Google Maps JavaScript API 引用中找不到这个,所以我在这里问。有没有办法在放下街景小人时禁用街景的室内部分?我只想在户外环顾四周。
上图显示了我要禁用的内容。
geocodezip 问的例子:jsfiddle.net/Dredd/5zgp0vdh
最佳答案
要禁用室内街景 View ,请使用选项:{source: google.maps.StreetViewSource.OUTDOOR}
StreetViewLocationRequest
来自 the documentation :
source | Type: StreetViewSource
Specifies the source of panoramas to search. This allows a restriction to search for just outdoor panoramas for example. If not specified it is set to DEFAULT.
available values for StreetViewSource
DEFAULT Uses the default sources of Street View, searches will not be limited to specific sources.
OUTDOOR Limits Street View searches to outdoor collections. Indoor collections are not included in search results. Note also that the search only returns panoramas where it's possible to determine whether they're indoors or outdoors. For example, PhotoSpheres are not returned because it's unknown whether they are indoors or outdoors.
关于javascript - 有没有办法从默认的谷歌地图api街景中禁用室内街景,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34308007/