export var baseLayerConfig = [
  //基础图层
  // {
  //     'id':'countryGraphicLayer',
  //     'url':'http://106.15.207.106:6080/arcgis/rest/services/cnty150/MapServer',//150个县
  //     'type':'dynamic',
  //     'visible':false,
  //     'definitionExpression':'',
  // },
  // {
  //     'id':'mapServer_fpx',
  //     'url':'http://gis.goldenwater.com.cn:6080/arcgis/rest/services/dc/fpx_all/MapServer',//扶贫县 全部
  //     'type':'dynamic',
  //     'visible':false,
  //     'definitionExpression':'',
  //     'sublayers':[
  //         {
  //             id: 3,
  //             visible: true
  //         }
  //     ],
  // },{
  //     'id':'mapServer_zdx',
  //     'url':'http://gis.goldenwater.com.cn:6080/arcgis/rest/services/dc/fpx_zdx/MapServer',//重点扶贫县
  //     'type':'dynamic',
  //     'visible':false,
  //     'definitionExpression':'',
  //     'sublayers':[
  //         {
  //             id: 3,
  //             visible: true
  //         }
  //     ],
  // },{
  //     'id':'mapServer_bjx',
  //     'url':'http://gis.goldenwater.com.cn:6080/arcgis/rest/services/dc/fpx_bjx/MapServer',//边境扶贫县
  //     'type':'dynamic',
  //     'visible':false,
  //     'definitionExpression':'',
  //     'sublayers':[
  //         {
  //             id: 3,
  //             visible: true
  //         }
  //     ],
  // },{
  //     'id':'mapServer_tcx',
  //     'url':'http://gis.goldenwater.com.cn:6080/arcgis/rest/services/dc/fpx_tcx/MapServer',//天窗扶贫县
  //     'type':'dynamic',
  //     'visible':false,
  //     'definitionExpression':'',
  //     'sublayers':[
  //         {
  //             id: 3,
  //             visible: true
  //         }
  //     ],
  // },{
  //     'id':'mapServer_ddfp',
  //     'url':'http://gis.goldenwater.com.cn:6080/arcgis/rest/services/dc/fpx_ddx/MapServer',//定点扶贫县
  //     'type':'dynamic',
  //     'visible':false,
  //     'definitionExpression':'',
  //     'sublayers':[
  //         {
  //             id: 3,
  //             visible: true
  //         }
  //     ],
  // }
  // {
  //     'id':'sk_allLayer',
  //     'url':'http://106.15.207.106:6080/arcgis/rest/services/dudao/sk/MapServer',//所有水库
  //     'type':'dynamic',
  //     'visible':false,
  //     'definitionExpression':'TOT_CAP > 500',
  // }
];
export var queryLayer = {
  province:
    'http://gis.goldenwater.com.cn:6080/arcgis/rest/services/xzqh/xzqh_cx/MapServer/0',
  city: 'http://gis.goldenwater.com.cn:6080/arcgis/rest/services/xzqh/xzqh_cx/MapServer/1',
  country:
    'http://gis.goldenwater.com.cn:6080/arcgis/rest/services/xzqh/xzqh_cx/MapServer/2',
  // 'province':'http://106.15.207.106:6080/arcgis/rest/services/xzqh/MapServer/0',
  // 'city':'http://106.15.207.106:6080/arcgis/rest/services/xzqh/MapServer/1',
  // 'country':'http://106.15.207.106:6080/arcgis/rest/services/xzqh/MapServer/2',
};
export var baseLayerOptions_M = [
  //墨卡托底图
  {
    //影像服务
    id: 'id_image',
    // "urlTemplate": "http://10.1.7.160:81/img_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=img&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TILEMATRIX=${level}&TILEROW=${row}&TILECOL=${col}",
    urlTemplate:
      'http://{subDomain}.tianditu.gov.cn/img_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&tk=66b63588d9f26d7be3394ac366a45e9f&LAYER=img&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&tilecol=${col}&tilerow=${row}&tilematrix=${level}',
    type: 'tdtLayer',
    subDomains: ['t0'],
    visible: true,
    style: 'img',
  },
  {
    //谷歌影像
    id: 'id_google',
    urlTemplate:
      'http://www.google.cn/maps/vt?lyrs=s@189&x={col}&y={row}&z={level}', //谷歌影像
    // "urlTemplate": "http://www.google.cn/maps/vt?lyrs=m@189&gl=cn&x={col}&y={row}&z={level}",//谷歌平面
    type: 'google',
    subDomains: [],
    visible: false,
    style: 'img',
  },
  {
    //天地图影像注记
    id: 'id_image_label',
    urlTemplate:
      'http://{subDomain}.tianditu.gov.cn/cia_w/wmts?service=wmts&request=gettile&version=1.0.0&v=4.0&tk=66b63588d9f26d7be3394ac366a45e9f&layer=cia&format=tiles&tilematrixset=w&tilecol=${col}&tilerow=${row}&tilematrix=${level}',
    type: 'tdtLayer',
    subDomains: ['t0'],
    visible: true,
    style: 'img',
  },
  // {//水系服务——影像
  //     'id': "id_River_img",
  //     "urlTemplate": "http://10.1.7.160:81/dlb_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=dlb&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TILEMATRIX=${level}&TILEROW=${row}&TILECOL=${col}",
  //     "type":"tdtLayer",
  //     "subDomains": [],
  //     "visible":true,
  //     "style":'img',
  // },
  // {//水系服务注记——影像
  //     'id': "id_river_label_img",
  //     "urlTemplate": "http://10.1.7.160:81/dia_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=dia&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TILEMATRIX=${level}&TILEROW=${row}&TILECOL=${col}",
  //     "type":"tdtLayer",
  //     "subDomains": [],
  //     "visible":true,
  //     "style":'img',
  // },
  {
    //高德矢量
    id: 'id_gaode',
    urlTemplate:
      'http://webrd01.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={col}&y={row}&z={level}',
    // "urlTemplate": "http://www.google.cn/maps/vt?lyrs=s@189&x={col}&y={row}&z={level}",//谷歌影像
    // "urlTemplate": "http://www.google.cn/maps/vt?lyrs=m@189&gl=cn&x={col}&y={row}&z={level}",//谷歌平面
    type: 'tdtLayer',
    subDomains: [],
    visible: false,
    style: 'img',
  },

  // {//地形服务
  //     "id": "id_ter",
  //     "urlTemplate": "http://10.1.7.160:81/ter_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=ter&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TILEMATRIX=${level}&TILEROW=${row}&TILECOL=${col}",
  //     "type":"tdtLayer",
  //     "subDomains": [],
  //     "visible":false,
  //     "style":'ter'
  // },
  // {//天地图地形注记
  //     "id": "id_ter_label",
  //     "urlTemplate": "http://{subDomain}.tianditu.gov.cn/cta_w/wmts?service=wmts&request=gettile&version=1.0.0&v=4.0&tk=66b63588d9f26d7be3394ac366a45e9f&layer=cta&format=tiles&tilematrixset=w&tilecol=${col}&tilerow=${row}&tilematrix=${level}",
  //     "type":"tdtLayer",
  //     "subDomains": ["t0"],
  //     "visible":false,
  //     "style":'ter'
  // },
  // {//水系服务——地形
  //     'id': "id_River_ter",
  //     "urlTemplate": "http://10.1.7.160:81/dlb_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=dlb&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TILEMATRIX=${level}&TILEROW=${row}&TILECOL=${col}",
  //     "type":"tdtLayer",
  //     "subDomains": [],
  //     "visible":false,
  //     "style":'ter'
  // },
  // {//水系服务注记——地形
  //     'id': "id_river_label_ter",
  //     "urlTemplate": "http://10.1.7.160:81/dia_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=dia&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TILEMATRIX=${level}&TILEROW=${row}&TILECOL=${col}",
  //     "type":"tdtLayer",
  //     "subDomains": [],
  //     "visible":false,
  //     "style":'ter'
  // },
];
export var baseLayerOptions = [
  //底图
  {
    //影像服务
    id: 'id_image',
    urlTemplate:
      'http://10.1.7.160:81/img_c/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=img&STYLE=default&TILEMATRIXSET=c&FORMAT=tiles&TILEMATRIX=${level}&TILEROW=${row}&TILECOL=${col}',
    type: 'tdtLayer',
    subDomains: [],
    visible: true,
    style: 'img',
  },
  {
    //天地图影像注记
    id: 'id_image_label',
    urlTemplate:
      'http://{subDomain}.tianditu.gov.cn/cia_c/wmts?service=wmts&request=gettile&version=1.0.0&v=4.0&tk=66b63588d9f26d7be3394ac366a45e9f&layer=cia&format=tiles&tilematrixset=c&tilecol=${col}&tilerow=${row}&tilematrix=${level}',
    type: 'tdtLayer',
    subDomains: ['t0'],
    visible: true,
    style: 'img',
  },
  {
    //水系服务——影像
    id: 'id_River_img',
    urlTemplate:
      'http://10.1.7.160:81/dlb_c/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=dlb&STYLE=default&TILEMATRIXSET=c&FORMAT=tiles&TILEMATRIX=${level}&TILEROW=${row}&TILECOL=${col}',
    type: 'tdtLayer',
    subDomains: [],
    visible: true,
    style: 'img',
  },
  {
    //水系服务注记——影像
    id: 'id_river_label_img',
    urlTemplate:
      'http://10.1.7.160:81/dia_c/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=dia&STYLE=default&TILEMATRIXSET=c&FORMAT=tiles&TILEMATRIX=${level}&TILEROW=${row}&TILECOL=${col}',
    type: 'tdtLayer',
    subDomains: [],
    visible: true,
    style: 'img',
  },
  {
    //地形服务
    id: 'id_ter',
    urlTemplate:
      'http://10.1.7.160:81/ter_c/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=ter&STYLE=default&TILEMATRIXSET=c&FORMAT=tiles&TILEMATRIX=${level}&TILEROW=${row}&TILECOL=${col}',
    type: 'tdtLayer',
    subDomains: [],
    visible: false,
    style: 'ter',
  },
  {
    //天地图地形注记
    id: 'id_ter_label',
    urlTemplate:
      'http://{subDomain}.tianditu.gov.cn/cta_c/wmts?service=wmts&request=gettile&version=1.0.0&v=4.0&tk=66b63588d9f26d7be3394ac366a45e9f&layer=cta&format=tiles&tilematrixset=c&tilecol=${col}&tilerow=${row}&tilematrix=${level}',
    type: 'tdtLayer',
    subDomains: ['t0'],
    visible: false,
    style: 'ter',
  },
  {
    //水系服务——地形
    id: 'id_River_ter',
    urlTemplate:
      'http://10.1.7.160:81/dlb_c/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=dlb&STYLE=default&TILEMATRIXSET=c&FORMAT=tiles&TILEMATRIX=${level}&TILEROW=${row}&TILECOL=${col}',
    type: 'tdtLayer',
    subDomains: [],
    visible: false,
    style: 'ter',
  },
  {
    //水系服务注记——地形
    id: 'id_river_label_ter',
    urlTemplate:
      'http://10.1.7.160:81/dia_c/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=dia&STYLE=default&TILEMATRIXSET=c&FORMAT=tiles&TILEMATRIX=${level}&TILEROW=${row}&TILECOL=${col}',
    type: 'tdtLayer',
    subDomains: [],
    visible: false,
    style: 'ter',
  },
];
// 高德瓦片配置 ，注意wkid在4326时位置不对，102100位置才能匹配
export var gaodeTileInfo = {
  dpi: 90.71428571427429,
  rows: 256,
  cols: 256,
  compressionQuality: 0,
  origin: {
    x: -20037508.342787,
    y: 20037508.342787,
  },
  spatialReference: {
    wkid: 102100,
  },
  lods: [
    { level: 0, resolution: 156543.033928, scale: 591657527.591555 },
    { level: 1, resolution: 78271.5169639999, scale: 295828763.795777 },
    { level: 2, resolution: 39135.7584820001, scale: 147914381.897889 },
    { level: 3, resolution: 19567.8792409999, scale: 73957190.948944 },
    { level: 4, resolution: 9783.93962049996, scale: 36978595.474472 },
    { level: 5, resolution: 4891.96981024998, scale: 18489297.737236 },
    { level: 6, resolution: 2445.98490512499, scale: 9244648.868618 },
    { level: 7, resolution: 1222.99245256249, scale: 4622324.434309 },
    { level: 8, resolution: 611.49622628138, scale: 2311162.217155 },
    { level: 9, resolution: 305.748113140558, scale: 1155581.108577 },
    { level: 10, resolution: 152.874056570411, scale: 577790.554289 },
    { level: 11, resolution: 76.4370282850732, scale: 288895.277144 },
    { level: 12, resolution: 38.2185141425366, scale: 144447.638572 },
    { level: 13, resolution: 19.1092570712683, scale: 72223.819286 },
    { level: 14, resolution: 9.55462853563415, scale: 36111.909643 },
    { level: 15, resolution: 4.77731426794937, scale: 18055.954822 },
    { level: 16, resolution: 2.38865713397468, scale: 9027.977411 },
    { level: 17, resolution: 1.19432856685505, scale: 4513.988705 },
    { level: 18, resolution: 0.597164283559817, scale: 2256.994353 },
    { level: 19, resolution: 0.298582141647617, scale: 1128.497176 },
  ],
};
