/*
 *公司初始化配置
 */
export const esriConfig = {
  baseUrl: 'http://192.168.2.238:8080/arcgis_js_api/v416/arcgis_js_api/library/4.16/dojo/dojo.js',
  baseCssUrl: 'http://192.168.2.238:8080/arcgis_js_api/v416/arcgis_js_api/library/4.16/esri/css/main.css',
  font_url: 'http://192.168.2.238:8080/arcgis_js_api/v416/arcgis_js_api/library/fonts/'
}

export const iserverConfig = {
  baseUrl: 'http://192.168.2.20:8090/iserver/',
  geoServerUrl: 'http://192.168.2.248:8082/'
}

export const geoServerConfigIn = {
  geoServerUrl: 'http://192.168.2.248:8082/'
}

export const geoServerConfigOut = {
  //客户
  geoServerUrl: 'http://117.177.153.11:12002/',
  //公司
  geoServerUrl1: 'http://221.182.8.141:12002/'
}


export const geoServerConfig = geoServerConfigOut


export const appconfig = {
  // 是否根据后台配置服务
  isloadServer: false,
  // 底图是否采用在线地图,true在线,false离线
  isonline: true,
  // 天地图秘钥
  // 'tianMapKey': 'd23f3b9d7d2e305366291bbafe5582e6',
  tianMapKey: '908404235938aecd5826e630a95c88b0',
  // 打印模板
  templateFolder: 'D:/xrty/template',
  // 地图初始视角中心
  initCenter: [105.736636, 32.402062],
  //initCenter: [570106.81475, 3588470.94355],
  //空间参考
  projection: 'EPSG:4326',
  initLayers: 'pipemap&&smlayergroup', // 必须配置,管线名称&&超图图层组
  // 地图初始视角级别
  initZoom: 13,
  currPRJ: 'proj44',
  // token
  usertoken: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJVc2VySUQiOiIiLCJVU0VSTkFNRSI6IiIsIlJFQUxOQU1FIjoiIiwiV0tJRCI6NDU0NCwiUkFOR0UiOiJYUlRZIiwiUkFOR0VGSUVMRCI6bnVsbCwiQ09ERSI6IlhSVFkiLCJDT05ORUNUU1RSIjoiREFUQUJBU0U9b3JjbDtORVROQU1FPTE5Mi4xNjguMi4yNDIvb3JjbDtTRVJWRVI9MTkyLjE2OC4yLjI0MjtVU0VSSUQ9dGZfeHJ0eV9nZW87UEFTU1dPUkQ9dGZfeHJ0eV9nZW87UE9SVD0xNTIxQDUxNTEvdGNwO1ZFUlNJT049c2RlLkRFRkFVTFQiLCJCb3JuVGltZSI6MCwiQXBwSUQiOm51bGx9.bMNoX6nsvNYukk47_UnT9IHGlNIWclbmiXTj3ak1i5KuF5LGexfwV7TwF80nP08GEPaNwScgk7lbJkRHcqtT8w',
  // 地图资源服务
  gisResource: {
    // add iserverResource
    iserver_resource: {
      printerService: {
        name: '打印服务',
        url: iserverConfig.baseUrl + 'services/webprinting/rest/webprinting/v1'
      },
      netAnalysisService: {
        name: '网络分析服务',
        url: iserverConfig.baseUrl + 'services/transportationAnalyst-tf_pzhps/rest/networkanalyst/NETWORK_PSPS@tofly'
      },
      dataService: {
        name: '数据服务',
        url: iserverConfig.baseUrl + 'services/data-tf_pzhps/rest/data',
        dataSource: 'tofly',
        dataSet: ['psmap'],
        dataSetInfo: [
        ]
      },
      layerService: {
        name: '图层服务',
        layers: [
          {
            name: '矢量底图',
            isLabel: false,
            type: 'tdtlayer',
            url: 'http://t0.tianditu.gov.cn/vec_c/wmts?tk=',
            visible: true
          },
          {
            name: '影像底图',
            isLabel: false,
            type: 'tdtlayer',
            url: 'http://t0.tianditu.gov.cn/img_c/wmts?tk=',
            visible: false
          },
          {
            name: '矢量注记',
            type: 'tdtlayer',
            isLabel: true,
            url: 'http://t0.tianditu.gov.cn/cva_c/wmts?tk=',
            visible: true
          },
          {
            name: '影像注记',
            type: 'tdtlayer',
            isLabel: true,
            url: 'http://t0.tianditu.gov.cn/cia_c/wmts?tk=',
            visible: false
          },

          //本地发布管网服务
          {
            name: 'pipemaptest',
            title: '管网切片',
            type: 'ugcvlayer',
            url: iserverConfig.baseUrl + 'services/map-tf_pzhps/rest/maps/pipemap',

            visible: false,
            legendUrl: iserverConfig.baseUrl + 'services/map-tf_pzhps/rest/maps/pipemap/layers/',
            sublayers: []
          },
          {
            name: 'pipemap',
            title: '综合管网',
            type: 'smlayergroup',
            url: iserverConfig.baseUrl + 'services/map-tf_pzhps/rest/maps/pipemap',
            visible: true,
            legendUrl: iserverConfig.baseUrl + 'services/map-tf_pzhps/rest/maps/pipemap/layers/',
            sublayers: []
          }
        ]
      }
    },

    geoserver_resource: {
      basicLayerService: {
        name: '图层服务',
        layers: [
          {
            name: '矢量底图',   //地图名称
            typeName: '球面墨卡托投影',   //地图类型名称
            isLabel: false,
            type: 'tdtlayer',   //图层类型
            url: 'http://t0.tianditu.com/DataServer?T=vec_w&x={x}&y={y}&l={z}&tk=',//'http://t0.tianditu.gov.cn/vec_w/wmts?tk=',
            layer: "vec", //图层  注意每个图层这里不同
            matrixSet: "w",
            format: "tiles",
            style: "default",
            opacity: 1,   //透明度
            visible: true  //图层是否显示
          },
          {
            name: '矢量注记',
            typeName: '球面墨卡托投影',
            isLabel: false,
            type: 'tdtlayer',
            url: 'http://t0.tianditu.com/DataServer?T=cva_w&x={x}&y={y}&l={z}&tk=',//'http://t0.tianditu.gov.cn/cva_w/wmts?tk=',
            layer: "cva",
            matrixSet: "w",
            format: "tiles",
            style: "default",
            opacity: 1,
            visible: true
          },
          {
            name: '影像底图',
            typeName: '球面墨卡托投影',
            isLabel: false,
            type: 'tdtlayer',
            url: 'http://t0.tianditu.com/DataServer?T=img_w&x={x}&y={y}&l={z}&tk=',//'http://t0.tianditu.gov.cn/cva_w/wmts?tk=',
            layer: "img",
            matrixSet: "w",
            format: "tiles",
            style: "default",
            opacity: 1,
            visible: false
          },
          {
            name: '影像注记',
            typeName: '球面墨卡托投影',
            isLabel: false,
            type: 'tdtlayer',
            url: 'http://t0.tianditu.com/DataServer?T=cia_w&x={x}&y={y}&l={z}&tk=',//'http://t0.tianditu.gov.cn/cva_w/wmts?tk=',
            layer: "cia",
            matrixSet: "w",
            format: "tiles",
            style: "default",
            opacity: 1,
            visible: false
          },
        ]
      },
      geoServerSource: {
        url: geoServerConfig.geoServerUrl + 'geoserver',
        IP: "",
        wkid: "EPSG:4326",
        namespace: "fxpl",
        maxzoom: 21,
        minzoom: 2,
        terrain: {
          name: "行政区划分布",
          type: "tilewms",
          issplit: true,
          key: "dixing",
          opacity: 0.8,
          visible: true,
          description: "行政区划分布",
          param: {
            url: geoServerConfig.geoServerUrl + 'geoserver/wms',
            params: {
              FORMAT: 'image/png',
              VERSION: '1.1.1',
              tiled: true,
              LAYERS: 'myws:myws_dxt',
              exceptions: 'application/vnd.ogc.se_inimage',
              tilesOrigin: 449673.15625 + "," + 3461074
            }
          }
        },
        basepipe: {
          name: "管网分布",
          type: "tilewms",
          key: "guanwang",
          issplit: true,
          opacity: 1,
          visible: true,
          description: "管网分布",
          param: {
            url: geoServerConfig.geoServerUrl + 'geoserver/wms',
            params: {
              FORMAT: 'image/png',
              VERSION: '1.1.0',
              tiled: true,
              LAYERS: 'fxpl:pipemap',
              exceptions: 'application/vnd.ogc.se_inimage',
              tilesOrigin: 307649.085574611 + "," + 2488394.233887289
            },
            crossOrigin: 'anonymous',  //处理跨域
          }
        }
      },
      queryServer: {
        uri: geoServerConfig.geoServerUrl + 'geoserver',
        url: geoServerConfig.geoServerUrl + "geoserver/fxpl/wfs",
        namespace: 'fxpl',
        featurePrefix: 'fxpl',
        wkid: 4326,
        srsName: 'EPSG:4490',   //'EPSG:4326',
        service: 'WFS',
        version: '1.1.0',
        request: 'GetFeature',
        outputformat: 'JSON',
        typeName_uniqueval: 'fxpl:uniqueval',    //获取唯一值的类型名
        typeName_layerfields: 'fxpl:layerfields', //获取图层的类型名
        typeName_statistic: 'fxpl:themastatistics', //统计的类型名
      }
    },

  },
  //大屏地图服务
  bigScreenMapService: {
    initCenter: [105.76437139908836, 32.4173752267069],
    initZoom: 14,
    projection: 'EPSG:4326',
    layerService: {
      citymap: {
        name: "底图服务",
        type: "tilewms",
        key: "bigScreenBaseMap",
        issplit: false,
        opacity: 1,
        visible: true,
        description: "底图服务",
        param: {
          url: geoServerConfig.geoServerUrl + 'geoserver/wms',
          params: {
            FORMAT: 'image/png',
            VERSION: '1.1.0',
            tiled: true,
            LAYERS: 'fxpl:basemap',
            exceptions: 'application/vnd.ogc.se_inimage',
            tilesOrigin: 307649.085574611 + "," + 2488394.233887289
          },
          crossOrigin: 'anonymous',  //处理跨域
        }
      },
      pipemap: {
        name: "管网服务",
        type: "tilewms",
        key: "bigScreenPipeMap",
        issplit: true,
        opacity: 1,
        visible: true,
        description: "管网服务",
        param: {
          url: geoServerConfig.geoServerUrl + 'geoserver/wms',
          params: {
            FORMAT: 'image/png',
            VERSION: '1.1.0',
            tiled: true,
            LAYERS: 'fxpl:pipemap',
            exceptions: 'application/vnd.ogc.se_inimage',
            tilesOrigin: 307649.085574611 + "," + 2488394.233887289
          },
          crossOrigin: 'anonymous',  //处理跨域
        }
      }
    }
  }
}

/**
 * 轮询时机设置
 */
export const notificationInterval = 30000
export const homeInterval = 60000