// 3维地图有关配置 const config = { scene:{ // 默认视角参数 center: { lat:36.290705 , lng:117.424668 , alt: 30000, heading: 360, pitch: -45 }, showSun: true, // mapProjection: new Cesium.MapProjection. // showMoon: true, // showSkyBox: true, showSkyAtmosphere: false, // 关闭球周边的白色轮廓 map.scene.skyAtmosphere = false fog: true, fxaa: true, // 以下是Cesium.Globe对象相关参数 globe: { depthTestAgainstTerrain: true, // 是否启用深度监测 baseColor: '#1A2126', // 地球默认背景色 showGroundAtmosphere: false, // 是否在地球上绘制的地面大气 enableLighting: false // 是否显示昼夜区域 }, control: { infoBox: false }, // 以下是Cesium.ScreenSpaceCameraController对象相关参数 cameraController: { zoomFactor: 3.0, // 鼠标滚轮放大的步长参数 minimumZoomDistance: 1, // 地球放大的最小值(以米为单位) maximumZoomDistance: 5000000, // 地球缩小的最大值(以米为单位) enableRotate: true, // 2D和3D视图下,是否允许用户旋转相机 enableTranslate: true, // 2D和哥伦布视图下,是否允许用户平移地图 enableTilt: true, // 3D和哥伦布视图下,是否允许用户倾斜相机 enableZoom: true, // 是否允许 用户放大和缩小视图 enableCollisionDetection: true // 是否允许 地形相机的碰撞检测 } }, terrian:{ type: 'xyz', // 地形类型,xyz: 标准xyz服务,none: 无地形,arcgis arcgis地形服务 url:'http://data.mars3d.cn/terrain' }, // 地形,地形只支持一个 crs:'EPSG:4490', // 坐标系,支持EPSG:3857(墨卡托), EPSG4326(WSG84), EPSG:4490(CGCS2000) basemaps:[ { name: "天地图影像(EPSG:3857)", icon: "img/basemaps/tdt_img.png", type: "tdt", layer: "img_d", key: '216ee92889e17ab1b083fae665d522b8', show: true }, { name:'2020影像图', // 图层名称 type:'wmts', //图层类型: tdt天地图,gaode高德地图,wmts, wms, url:'http://172.20.90.108:8081/geoesb/proxy/5a44607b2e814658b463b76f9675bd3e/9bf164775ad94a18a5324f0eb681deea/Layers/default/Custom_Layers/{TileMatrix}/{TileRow}/{TileCol}.png', // 地址 key:'', // 密钥 crs:'EPSG:4490', layer:'wzmap_map', style:'default', format:'image/png', tileMatrixSetID:'default028mm', show: true }, { name:'2021电子地图', // 图层名称 type:'wmts', //图层类型: tdt天地图,gaode高德地图,wmts, wms, url:'http://172.20.90.108:8081/geoesb/proxy/4fb75f7491c94356a9dd58a44d0dc57b/9bf164775ad94a18a5324f0eb681deea?service=WMTS&request=GetTile&version=1.0.0&layer=JN2020DOM_05M&style=default&format=image/png&TileMatrixSet=CustomCRS4490ScaleJN2020DOM_05M&TileMatrix={TileMatrix}&TileRow={TileRow}&TileCol={TileCol}', // 地址 key:'', // 密钥 crs:'EPSG:4490', layer:'wzmap_map', style:'default', format:'image/png', tileMatrixSetID:'default028mm', show: true } ],// 地图图层 layers:[ { name:'燃气管线', type:'arcgisWfs', // 矢量图层类型: wfs矢量图层服务, S3M超图,tiles 3DTiles模型, gltf glTF小模型 url:'http://111.198.10.15:13002/arcgis/rest/services/gas/MapServer/1', // 地址 minimumLevel: 19, symbol:{ type: 'polylineVolumeP', // 矢量数据的style样式, polylineVolumeP是管道线 Primitive图元 style:{ color: '#eb6b0c', // 管道颜色 shape: 'pipeline', // 形状类型:pipeline空心管, circle实心管 radius: 0.1 // 默认半径 } }, center: {}, // 中心位置 flyto: true } ] // 矢量图层 } window.mapConfig = config