merge
parent
0b22db2f73
commit
309dc4f561
|
|
@ -432,15 +432,19 @@
|
|||
"uiType": "ImgTxtBtn",
|
||||
layers:baseLayers
|
||||
};
|
||||
// 图层管理工具
|
||||
switchLayerControler = new SwitchLayerControl({
|
||||
name:"图层管理" ,
|
||||
position:"top-left",
|
||||
showToTop:true,
|
||||
layerGroups:configlayers
|
||||
});
|
||||
if(props?.mapConfig?.baseLayers?.length>0 || props?.mapConfig?.layers?.length>0){
|
||||
map.addControl(switchLayerControler,"top-left");
|
||||
|
||||
|
||||
if(props?.mapConfig){
|
||||
if(props?.mapConfig?.baseLayers?.length > 0 && props?.mapConfig?.layers?.length > 0){
|
||||
// 图层管理工具
|
||||
switchLayerControler = new SwitchLayerControl({
|
||||
name:"图层管理" ,
|
||||
position:"top-left",
|
||||
showToTop:true,
|
||||
layerGroups:configlayers
|
||||
});
|
||||
map.addControl(switchLayerControler,"top-left");
|
||||
}
|
||||
}
|
||||
|
||||
handlerLayerChange()
|
||||
|
|
|
|||
Loading…
Reference in New Issue