添加场景全部s3m图层

$.ajax('http://xxx.xxx.xxx.xxx/iserver/services/3D-hebing9000/rest/realspace/scenes/hebing9000/layers.json',{
                        dataType:'json',//服务器返回json格式数据
                        type:'get',//HTTP请求类型
                        timeout:10000,//超时时间设置为10秒;
                        success:function(data){
                            data.forEach(function (e) {
                                viewer.scene.addS3MTilesLayerByScp('http://xxx.xxx.xxx.xxx/iserver/services/3D-hebing9000/rest/realspace/datas/'+e.dataName+'/config',{name:e.dataName});
                            })
    
                        },
                        error:function(xhr,type,errorThrown){
                            
                        }
                    });

你可能感兴趣的:(添加场景全部s3m图层)