/**
 * 基础服务配置
*/
const BASE_IP = 'http://192.168.119.192';
const iserverConfig = {
    baseUrl: `${BASE_IP}:8090/iserver/`,
    // subdomains: [
    //     `8090`,
    //     `7001`,
    //     `7002`,
    //     `7003`,
    //     `7004`,
    //     `7005`,
    //   ],
};
window.threeMapConfig = {
    initDestination: {
        x: 112.39415697775746,
        y: 34.91332337135989,
        z: 1557.5457612960613
    },
    initOrientation: {
        heading: 5.126025171871763,
        pitch: -0.41165893655816665,
        roll: 3.108624468950438e-14
    },
    mapConfig: {
        demUrl: iserverConfig.baseUrl + 'services/3D-local3DCache-DEM0304/rest/realspace/datas/DEM0304',
        isSct: true,
        defaultView: {
            destination: {
                x: 112.39415697775746,
                y: 34.91332337135989,
                z: 1557.5457612960613
            },
            orientation: {
                heading: 5.126025171871763,
                pitch: -0.41165893655816665,
                roll: 3.108624468950438e-14
            }
        },
        //类型type  GD高德,BDBD百度本地,BD百度,GOOGLE谷歌,TX腾讯,SUPER超图,SUPER_3D超图三维,WEBP超图webp
        layers2D: [
            // {
            //     id: 'yx',
            //     title: '天地图影像地图',
            //     epsg: 4326,
            //     show: true,
            //     minimumLevel: 0,
            //     maximumLevel: 18,
            //     type: 'TDT',
            //     url: [
            //         'http://t{s}.tianditu.com/img_w/wmts?service=wmts&request=GetTile&version=1.0.0&LAYER=img&tileMatrixSet=w&TileMatrix={TileMatrix}&TileRow={TileRow}&TileCol={TileCol}&style=default&format=tiles&tk=15f7b01aababbb39ab568f4ba12ea21c',
            //     ],
            //     subdomains: ['0', '1', '2', '3', '4', '5', '6', '7'],
            // },
            {
                id: 'yx',
                title: '天地图影像地图',
                epsg: 4326,
                show: true,
                minimumLevel: 0,
                maximumLevel: 18,
                type: 'SUPER',
                url: iserverConfig.baseUrl + 'services/map-ugcv5-YRGPGLOBALDOM2/rest/maps/YRGP_GLOBAL_DOM',
                
            },
            {
                id: 'yx1',
                title: '天地图影像地图',
                epsg: 4326,
                show: true,
                minimumLevel: 0,
                maximumLevel: 18,
                type: 'SUPER',
                url: iserverConfig.baseUrl + 'services/map-ugcv5-YRGCXLDDOM1m/rest/maps/YRGC_XLD_DOM_1m',
                
            },

            {
                id: 'f_swx',
                title: '水位线',
                epsg: 4326,
                show: true,
                minimumLevel: 0,
                maximumLevel: 18,
                type: 'SUPER',
                flyTo:true,
                url: 'http://192.168.119.13:8084/iserver/services/map-ugcv5-sx2D/rest/maps/sx2D',
                
            },

            {
                id: 'sl',
                title: '天地矢量地图',
                epsg: 4326,
                type: 'TDT',
                show: false,
                minimumLevel: 0,
                maximumLevel: 18,
                url: [
                    'http://t{s}.tianditu.gov.cn/vec_w/wmts?service=wmts&request=GetTile&version=1.0.0&LAYER=vec&tileMatrixSet=w&TileMatrix={TileMatrix}&TileRow={TileRow}&TileCol={TileCol}&style=default&format=tiles&tk=15f7b01aababbb39ab568f4ba12ea21c',
                ],
                subdomains: ['0', '1', '2', '3', '4', '5', '6', '7'],
            },
            {
                id: 'satellite',
                title: "库区遥感影像", //卫星遥感影像
                epsg: 4326,
                type: 'SUPER',
                show: false,
                minimumLevel: 0,
                maximumLevel: 18,
                //url: iserverConfig.baseUrl + 'services/3D-local3DCache-YRGPHHLYDOM1m/rest/realspace/datas/YRGP_HHLY_DOM_1m'
                url: iserverConfig.baseUrl + 'services/3D-local3DCache-DOMXLDKQ2022080d2m01/rest/realspace/datas/DOM_XLD_KQ_202208_0d2m_01',
                
            },
            {
                id: 'kq_hp_06',
                title: '库区航拍影像2024年6月',
                epsg: 4326,
                type: 'SUPER_3D',
                show: false,
                minimumLevel: 0,
                maximumLevel: 18,
                url: iserverConfig.baseUrl + 'services/DOM_XLDKQ_L2_202406_050cm_WGS84/rest/maps/小浪底库区202406期影像_WGS84',
                
            },
            {
                id: 'kq_hp_07',
                title: '库区航拍影像2024年7月',
                epsg: 4326,
                type: 'SUPER_3D',
                show: false,
                minimumLevel: 0,
                maximumLevel: 18,
                url: iserverConfig.baseUrl + 'services/DOM_XLDKQ_L2_202407_050cm_WGS84/rest/maps/小浪底库区202407期影像_WGS84',
                
            },
            {
                id: 'base_kq_dbs_2021_xq',
                title: "2021汛前坝前漏斗区水下地形数据",
                epsg: 4326,
                type: 'SUPER_3D',
                show: false,
                minimumLevel: 0,
                maximumLevel: 18,
                url: iserverConfig.baseUrl + 'services/3D-2021XQDBS/rest/realspace/datas/T2021年汛前小浪底汛前1%40SXDX',
                
            },
            {
                id: 'base_kq_dbs_2021_xh',
                title: "2021汛后坝前漏斗区水下地形数据",
                epsg: 4326,
                type: 'SUPER_3D',
                show: false,
                minimumLevel: 0,
                maximumLevel: 18,
                url: iserverConfig.baseUrl + 'services/3D-2021XHDBS/rest/realspace/datas/T2021年汛后小浪底汛后0d1m1%40SXDX',
                
            },
            {
                id: 'base_kq_dbs_2022_xq',
                title: "2022汛前坝前漏斗区水下地形数据",
                epsg: 4326,
                type: 'SUPER_3D',
                show: false,
                minimumLevel: 0,
                maximumLevel: 18,
                url: iserverConfig.baseUrl + 'services/3D-XLD_2022-DBS/rest/realspace/datas/XLD_2022@DBS',
                
            },
            {
                id: 'base_kq_dbs_2023_xq',
                title: "2023汛前坝前漏斗区水下地形数据",
                epsg: 4326,
                type: 'SUPER_3D',
                show: false,
                minimumLevel: 0,
                maximumLevel: 18,
                url: iserverConfig.baseUrl + 'services/3D-2023XQBQLDQ/rest/realspace/datas/T2023dem_OrthoImage_1@123',
                
            },
            {
                id: 'base_kq_dbs_2023_xh',
                title: "2023汛后坝前漏斗区水下地形数据",
                epsg: 4326,
                type: 'SUPER_3D',
                show: false,
                minimumLevel: 0,
                maximumLevel: 18,
                url: iserverConfig.baseUrl + 'services/3D-DEM_XLDBQLDQ_L2_202312_050dm/rest/realspace/datas/DEM_XLDBQLDQ_L2_202312_050dm_OrthoImage',
                
            },
    
        ],
        layers3D: [
            // {
            //     id: 'db_model',
            //     url: iserverConfig.baseUrl + 'services/3D-local3DCache-YRGPXLDDAM/rest/realspace',
            //     height: 0,
            //     flyTo: false,
            //     show: false,
            //     type: 'S3M',
            // },
            {
                id: 'xldqxsy',   //小浪底倾斜摄影
                url: iserverConfig.baseUrl + 'services/3D-XLDQXSY/rest/realspace',
                height: 100,
                flyTo: false,
                show: false,
                type: 'S3M',
            },
            {
                id: 'xxyqxsy', //西霞院倾斜摄影
                url: iserverConfig.baseUrl + 'services/3D-local3DCache-xxyqxsy/rest/realspace',
                height: 100,
                flyTo: false,
                show: false,
                type: 'S3M',
            },
            {
                id: 'XLD_CF_BIM_1',  //小浪底厂房BIM模型
                url: iserverConfig.baseUrl + 'services/3D-BIM_XLD_L2_DZCFDQSJ_202205/rest/realspace',
                height: 0,
                flyTo: false,
                show: false,
                type: 'S3M',
            },
            {
                id: 'XLD_CF_BIM',  //小浪底厂房BIM模型
                url: iserverConfig.baseUrl + 'services/3D-local3DCache-xldsj20240827/rest/realspace',
                height: 0,
                flyTo: false,
                show: false,
                type: 'S3M',
            },
            
            {
                id: 'base_kq_dbs_2021_xq',
                title: "2021汛前坝前漏斗区水下地形数据",
                url: iserverConfig.baseUrl + 'services/3D-2021XQDBS/rest/realspace',
                height: 0,
                flyTo: false,
                show: false,
                type: 'S3M',
            },
            
            
        ],
        asyncLayer3D: [

        ]
    },
    // 图层树
    layerControl: [
        {
            title: "基础底图",
            key: "basic_map",
            children: [],
            disabled: false,
            isLeaf: false
        },
        {
            title: "倾斜摄影",
            key: "base_scene",
            children: [],
            disabled: false,
            isLeaf: false,
            uper: 'basic_map',
        },
        {
            title: "库区水下地形",  //库区多波束
            key: "base_kq_dbs",
            children: [],
            disabled: false,
            isLeaf: false,
            uper: 'basic_map',
        },
        {
            title: "库区航拍影像",
            key: "base_kq_hp",
            children: [],
            disabled: false,
            isLeaf: false,
            uper: 'basic_map',
        },

        {
            title: "BIM模型",
            key: "bim_model",
            children: [],
            disabled: false,
            isLeaf: false,
            uper: 'basic_map',
        },
        {
            title: "小浪底倾斜摄影",
            key: "xldqxsy",
            isLeaf: true,
            uper: 'base_scene',
            fusionLayers: {
                model: 'xldqxsy'
            },
            isEdit: false,
        },

        {
            title: "西霞院倾斜摄影",
            key: "xxyqxsy",
            isLeaf: true,
            uper: 'base_scene',
            fusionLayers: {
                model: 'xxyqxsy'
            },
            isEdit: false,
        },
        {
            title: "小浪底",
            key: "XLD_CF_BIM",
            isLeaf: true,
            uper: 'bim_model',
            fusionLayers: {
                model: 'XLD_CF_BIM'
            },
            isEdit: false,
        },
        {
            title: "小浪底厂房",
            key: "XLD_CF_BIM_1",
            isLeaf: true,
            uper: 'bim_model',
            fusionLayers: {
                model: 'XLD_CF_BIM_1'
            },
            isEdit: false,
        },
        {
            title: "西霞院",
            key: "XXY_CF_BIM",
            isLeaf: true,
            uper: 'bim_model',
            fusionLayers: {
                model: 'XLD_CF_BIM'
            },
            isEdit: false,
        },

        {
            title: "库区遥感影像", //卫星遥感影像
            key: "satellite",
            isLeaf: true,
            uper: 'basic_map',
            fusionLayers: {
                layer2d: ['satellite']
            },
            isEdit: false,
        },
        {
            title: "2021汛前坝前漏斗区水下地形数据",
            key: "base_kq_dbs_2021_xq",
            isLeaf: true,
            uper: 'base_kq_dbs',
            fusionLayers: {
                layer2d: ['base_kq_dbs_2021_xq']
            },
            isEdit: false,
        },
        {
            title: "2021汛后坝前漏斗区水下地形数据",
            key: "base_kq_dbs_2021_xh",
            isLeaf: true,
            uper: 'base_kq_dbs',
            fusionLayers: {
                layer2d: ['base_kq_dbs_2021_xh']
            },
            isEdit: false,
        },
        {
            title: "2022汛前坝前漏斗区水下地形数据",
            key: "base_kq_dbs_2022_xq",
            isLeaf: true,
            uper: 'base_kq_dbs',
            fusionLayers: {
                layer2d: ['base_kq_dbs_2022_xq']
            },
            isEdit: false,
        },
        {
            title: "2023汛前坝前漏斗区水下地形数据",
            key: "base_kq_dbs_2023_xq",
            isLeaf: true,
            uper: 'base_kq_dbs',
            fusionLayers: {
                layer2d: ['base_kq_dbs_2023_xq']
            },
            isEdit: false,
        },
        {
            title: "2023汛后坝前漏斗区水下地形数据",
            key: "base_kq_dbs_2023_xh",
            isLeaf: true,
            uper: 'base_kq_dbs',
            fusionLayers: {
                layer2d: ['base_kq_dbs_2023_xh']
            },
            isEdit: false,
        },
        {
            title: "库区航拍影像202406",
            key: "kq_hp_06",
            isLeaf: true,
            uper: 'base_kq_hp',
            fusionLayers: {
                layer2d: ['kq_hp_06']
            },
            isEdit: false,
        },
        {
            title: "库区航拍影像202407", //卫星遥感影像
            key: "kq_hp_07",
            isLeaf: true,
            uper: 'base_kq_hp',
            fusionLayers: {
                layer2d: ['kq_hp_07']
            },
            isEdit: false,
        },
    ],
    // 视角配置
    layerView: {
        qxsy1: {
            isFlyTo: true, //是否支持定位
            viewExtent: {
                destination: {
                    x: 112.39415697775746,
                    y: 34.91332337135989,
                    z: 1557.5457612960613
                },
                orientation: {
                    heading: 5.126025171871763,
                    pitch: -0.41165893655816665,
                    roll: 3.108624468950438e-14
                }
            }// 定位默认范围,如果没配置的话则使用中心坐标去定位
        },
        dem: {
            isFlyTo: true, //是否支持定位
            viewExtent: {
                destination: {
                    x: 112.39415697775746,
                    y: 34.91332337135989,
                    z: 1557.5457612960613
                },
                orientation: {
                    heading: 5.126025171871763,
                    pitch: -0.41165893655816665,
                    roll: 3.108624468950438e-14
                }
            }// 定位默认范围,如果没配置的话则使用中心坐标去定位
        },
        dam: {
            isFlyTo: true, //是否支持定位
            viewExtent: {
                "destination": {
                    "x": 112.5262240096781,
                    "y": 34.863677273837936,
                    "z": 1880.2777799562828
                },
                "orientation": {
                    "heading": 0.06743990496026964,
                    "pitch": -0.6999909887287021,
                    "roll": 5.1514348342607263e-14
                }
            }// 定位默认范围,如果没配置的话则使用中心坐标去定位
        }
    },
    dataService: {
        name: '数据服务',
        url: iserverConfig.baseUrl + 'services/data-XLD_KQYG_R2D/rest/data',
        dataSource: 'XLD_KQYG_R2D',
        dataSet: ['psmap'], //暂不用
        dataSetInfo: [
            {
                name: 'XLD_FDSB_R2D',
                title: '发电设备',
                label: '发电设备'
            },
        ]
        // XLD_FDSB_R2D
        // XLD_SCAQSB_R2D
        // XLD_SGSB_R2D
        // XLD_SPJK_R2D
    },
    // 用于加载项目静态资源
    sourceUrl: 'http://192.168.119.192:12002/twoThreeMap', //本地运行
};