javascript - 有没有办法从默认的谷歌地图api街景中禁用室内街景

标签 javascript google-maps google-street-view

我在 Google Maps JavaScript API 引用中找不到这个,所以我在这里问。有没有办法在放下街景小人时禁用街景的室内部分?我只想在户外环顾四周。

Example

上图显示了我要禁用的内容。

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/

相关文章:

javascript - 谷歌街景中一个像素离地面的高度/海拔

javascript - 谷歌街景图像精度

javascript - 如何删除 Mapbox 项目上的标记

javascript - 如何在 aws S3 javascript SDK 中配置间隔和 max_attempts

java - 如何解决 setMyLocationEnabled 权限要求?

java - Google Map getMapAsync 无法在 fragment 中使用

android - 如何在 Android 中的 onMapReady() 之外添加 Google map 标记?

javascript - 禁用其他 Bootstrap-datepicker View 模式?

javascript - React.js——未正确传递组件

javascript - 从谷歌街景中的原始全景图向北行驶