初始化viewer:
提示:这里简述项目相关背景:
const mapBaseLayer = new WebTileLayer({urlTemplate: SystemConfig.dydImgUrl,visible: true,id: 'DYDImage',});//地图初始化mapconst map = new Map({basemap: 'satellite',ground: 'world-elevation',layers: [mapBaseLayer],});//初始化3D场景const view3d = new SceneView({container: container,map: map,//camera: SystemConfig.viewConfig.initCamera,qualityProfile: SystemConfig.viewConfig.qualityProfile,// viewingMode: SystemConfig.viewConfig.viewModel,// clippingArea: SystemConfig.viewConfig.kansasExtent,environment: {atmosphere: {quality: SystemConfig.viewConfig.quality,},// weather: {// type: 'cloudy', // autocasts as new CloudyWeather()// },background: {type: 'color',color: '#03c0fa',},starsEnabled: false,atmosphereEnabled: false,},});view3d.ui.components = [];view3d.popup = {dockEnabled: false,dockOptions: {buttonEnabled: false,// position: 'bottom-right',breakpoint: true,},collapseEnabled: false, // 移除title点击折叠功能spinnerEnabled: false,// autoCloseEnabled:true,actions: [], // 清空事件按钮 (缩放至、...)};//地图初始化中心点let pt = null;pt = SystemConfig.viewConfig.center? new Point({x: SystemConfig.viewConfig.center.x,y: SystemConfig.viewConfig.center.y,spatialReference: SystemConfig.viewConfig.spatialReference,}): null;view3d.when(() => {view3d.goTo({center: pt,zoom: 12.45840402466091,tilt: SystemConfig.viewConfig.initCamera.tilt,heading: SystemConfig.viewConfig.initCamera.heading,},{duration: 10000,},);});window.view = view3d;const viewLocal = new SceneView({container: null,map: map,camera: SystemConfig.viewConfig.localCamera,qualityProfile: SystemConfig.viewConfig.qualityProfile,viewingMode: SystemConfig.viewConfig.viewModel,//clippingArea: SystemConfig.viewConfig.kansasExtent,environment: {atmosphere: {quality: SystemConfig.viewConfig.quality,},weather: {type: 'sunny', // autocasts as new CloudyWeather()},background: {type: 'color',color: [99, 104, 68, 1],},starsEnabled: false,atmosphereEnabled: false,},});viewLocal.ui.components = [];viewLocal.popup = {dockOptions: {buttonEnabled: false,},collapseEnabled: false, // 移除title点击折叠功能spinnerEnabled: false,// autoCloseEnabled:true,actions: [], // 清空事件按钮 (缩放至、...)};