echarts做的地圖

options = {
    tooltip: {
      show: tre,
      triggerOn: 'item'
    },
    geo: {
      show: true,
      map: 'china',
      zoom: 1,
      label: {
        show: true,
        color: '#ccc',
        fontSize: '12'
      },
      left: 'center',
      roam: false,
      itemStyle: {
        normal: {
          areaColor: '#243141',
          borderColor: '#B7A770',
        },
        emphasis: {
          areaColor: '#4499d0',
        }
      }
    },
    series: [
      {
        name: '散點',
        type: 'effectScatter',
        coordinateSystem: 'geo',
        symbol: ['circle'],
        symbolSize: 7,
        hoverAnimation: true,
        zlevel: 1,
        rippleEffect: {
          brushType: 'stroke',
          scale: 4
        },
        data: this.convertData(WarehouseGeo), // [{name,value, ...other}]
        itemStyle: {
          normal: {
            color: '#FB9E00',
            shadowBlur: 10,
            shadowColor: '#FB9E00'
          },
          emphasis: {
            
          }
        }
      }

    ]
  }
// 座標不對,見諒
export const WarehouseGeo = {
    北京: { value: [123.241607, 45.857575] },
    上海: { value: [115.080221, 35.2801] }
 }

在這裏插入圖片描述

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章