百度地图怎么确认某个位置是否有全景地图

在地图开发中遇到了这个问题,我们是根据经纬度来显示全景地图的,所以没有用PanoramaControl控件,直接用了Panorama,发现有的坐标是取不到全景图的,经过查找,终于在文档里找到解决方案。先用PanoramaService检索下全景信息,如果没有的话,会返回null。
例子:

var panorama = new BMap.Panorama('dom'); 
var PanoramaService = new BMap.PanoramaService();

PanoramaService.getPanoramaByLocation(Point,data=>{
            if(data){
                panorama.setPosition(Point);
                panorama.show();
            }else{
                alert('当前位置没有全景地图');
            }
        });
 在宝塔上使用node搭建DPlayer视频弹幕接口API
数据库报Error during session start; please check your PHP and/or webserver log file and configure your PHP installation properly. Also ensure that cookies are enabled in your browser. session_write_close 
上一篇:在宝塔上使用node搭建DPlayer视频弹幕接口API
下一篇:数据库报Error during session start; please check your PHP and/or webserver log file and configure your PHP installation properly. Also ensure that cookies are enabled in your browser. session_write_close
评论

如果我的文章对你有帮助,或许可以打赏一下呀!

支付宝
微信
QQ