我发现一个问题,不确定是BUG还是就是这样限制的,如果我用addS3MTilesLayerByScp重复加载同一个scp文件,两个的话只要name不同就可以都显示出来,但如果是三个的话,name不同也无法显示第三个
const addS3MTilesLayerByScp = (params) => {
let promise = viewer.scene.addS3MTilesLayerByScp(params.url, {
name: params.name,
});
Cesium.when(
promise,
function (layers) {
console.log("addS3MTilesLayerByScp:", layers);
let lon = params.lon || layers.lon;
let lat = params.lat || layers.lat;
layers.lon = lon;
layers.lat = lat;
layers.LoadingPriority = 2;
layers.refresh();
},
function (e) {
console.log("e:", e);
}
);
};
// P4管线
addS3MTilesLayerByScp({
url: "http://10.11.3.118:8090/iserver/services/3D-local3DCache-fbx6/rest/realspace/datas/fbx/config",
name: "P4",
lon: 114.13470968230173,
lat: 22.50403919570558,
});
// P6管线
addS3MTilesLayerByScp({
url: "http://10.11.3.118:8090/iserver/services/3D-local3DCache-fbx6/rest/realspace/datas/fbx/config",
name: "P6",
lon: 114.1345573357633,
lat: 22.50403919570558,
});
// P5管线
addS3MTilesLayerByScp({
url: "http://10.11.3.118:8090/iserver/services/3D-local3DCache-fbx6/rest/realspace/datas/fbx/config",
name: "P5",
lon: 114.13450821054993,
lat: 22.50403919570558,
});