有什么方法可以阻止新发布的 Android 街景(作为 Google Play 服务 SDK 的一部分)向我显示室内位置?
我想根据 LatLng 和半径设置位置,但我只想要室外位置。
谢谢,
安迪。
最佳答案
2018 年 3 月 20 日,Google 终于宣布实现了此功能。
When setting the position of a Street View Panorama, you can now provide a StreetViewSource allowing the search to be restricted to outdoor-only results. Note this feature is experimental and some searches may still include indoor panoramas. For details, see the guide to Street View.
来源:https://developers.google.com/maps/documentation/android-api/releases#march_20_2018
公共(public)问题跟踪器中的相应功能请求已标记为已修复
https://issuetracker.google.com/issues/69047818
StreetViewPanorama 现在支持以下方法
public void setPosition(LatLng 位置,StreetViewSource 来源)
public void setPosition(LatLng 位置,int 半径,StreetViewSource 源)
查看文档以获取更多详细信息:
https://developers.google.com/android/reference/com/google/android/gms/maps/model/StreetViewSource
https://developers.google.com/android/reference/com/google/android/gms/maps/StreetViewPanorama
编码愉快!
关于Android Streetview - 避免室内位置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23856145/