export enum MapboxConfig {
  ACCESS_TOKEN = 'pk.eyJ1Ijoic2hpY2hhbzEyMyIsImEiOiJja3FobnI1aDEwNGF6Mm9vOXVhNnBzZmFhIn0.2fZKiMqCQHxVY74QShMEGQ',
  // ACCESS_TOKEN = "1234",
  TDT_TOKEN = 'b6585bc41ee16251dbe6b1af64f375d9',
  // add more config options here
}
export const MapboxDefaultStyle = {
  glyphs: 'mapbox://fonts/mapbox/{fontstack}/{range}.pbf',
  version: 8,
  sources: {
    'raster-tiles': {
      type: 'raster',
      tiles: [
        `https://t0.tianditu.gov.cn/DataServer?T=img_w&x={x}&y={y}&l={z}&tk=${MapboxConfig.TDT_TOKEN}`,
      ],
      tileSize: 256,
    },
  },
  layers: [
    {
      id: 'tdt-img-tiles',
      type: 'raster',
      source: 'raster-tiles',
      minzoom: 0,
      maxzoom: 18,
    },
  ],
};

export const MapControlConfig = {
  DrawPoint: {
    handler: 'handlerDrawPoint',
    icon: '/point.png',
    title: '绘制点',
  },
  DrawLineString: {
    handler: 'handlerDrawLineString',
    icon: '/line.png',
    title: '绘制线',
  },
  DrawPolygon: {
    handler: 'handlerDrawPolygon',
    icon: '/polygon.png',
    title: '绘制面',
  },
};
