• 漏刻有时数据可视化Echarts组件开发(31):geomap伪3D配置示例


    在这里插入图片描述

            echarts.registerMap("丹东", getData());
          let data = getData().features.map((item) => {
       
            return {
       
              name: item.properties.name,
            };
          });
         
          const points = [
                [116.289929,40.265374],
                [116.754101,40.063877],
                [116.229504,39.764735],
                [115.883434,39.899721]
        ]
          let option = {
       
            backgroundColor:"#030528",
            geo: [
              {
       
                map: "丹东",
                aspectScale: 1,
                zoom: 0.65,
                layoutCenter: ["50%", "50%"],
                layoutSize: "180%",
                show: true,
                roam: false,
                label: {
       
                  emphasis: {
       
                    show: false,
                  },
                },
                itemStyle: {
       
                  normal: {
       
                    borderColor: "#c0f3fb",
                    borderWidth: 1,
                    shadowColor: "#8cd3ef",
                    shadowOffsetY: 10,
                    shadowBlur: 120,
                    areaColor: "transparent",
                  },
                }
              },
              // 重影
              {
       
                type: "map",
                map: "丹东",
                zlevel: -1,
                aspectScale: 1,
                zoom: 0.65,
                layoutCenter: ["50%", "51%"],
                layoutSize: "180%",
                roam: false,
                silent: true,
                itemStyle: {
       
                  normal: {
       
                    borderWidth: 1,
                    // borderColor:"rgba(17, 149, 216,0.6)",
                    borderColor: "rgba(58,149,253,0.8)",
                    shadowColor: "rgba(172, 122, 255,0.5)",
                    shadowOffsetY: 5,
                    shadowBlur: 15,
                    areaColor: "rgba(5,21,35,0.1)",
                  },
                },
              },
              {
       
                type: "map",
                map: "丹东",
                zlevel: -2,
                aspectScale: 1,
                zoom: 0.65,
                layoutCenter: ["50%", "52%"],
                layoutSize: "180%",
                roam: false,
                silent: true,
                itemStyle: {
       
                  normal: {
       
                    borderWidth: 1,
                    // borderColor: "rgba(57, 132, 188,0.4)",
                    borderColor: "rgba(58,149,253,0.6)",
                    shadowColor: "rgba(65, 214, 255,0.6)",
                    shadowOffsetY: 5,
                    shadowBlur: 15,
                    areaColor: "rgba(5,21,35,0.1)",
                  },
                },
              },
              {
       
                type: "map",
                map: "丹东",
                zlevel: -3,
                aspectScale: 1,
                zoom: 0.65,
                layoutCenter: ["50%", "53%"],
                layoutSize: "180%",
                roam: false,
                silent: true,
                itemStyle: {
       
                  normal: {
       
                    borderWidth: 1,
                    // borderColor: "rgba(11, 43, 97,0.8)",
                    borderColor: "rgba(58,149,253,0.4)",
                    shadowColor: "rgba(29, 111, 165,1)",
                    shadowOffsetY: 15,
                    shadowBlur: 10,
                    areaColor: "rgba(5,21,35,0.1)",
                  },
                },
              },
              {
       
                type: "map",
                map: "丹东",
                zlevel: -4,
                aspectScale: 1,
                zoom: 0.65,
                layoutCenter: ["50%", "54%"],
                layoutSize: "180%",
                roam: false,
                silent: true,
                itemStyle: {
       
                  normal: {
       
                    borderWidth: 5,
                    // borderColor: "rgba(11, 43, 97,0.8)",
                    borderColor: "rgba(5,9,57,0.8)",
                    shadowColor: "rgba(29, 111, 165,0.8)",
                    shadowOffsetY: 15,
                    shadowBlur: 10,
                    areaColor: "rgba(5,21,35,0.1)",
                  },
                },
              },
            ],
            series: [
              {
       
                name: "丹东市数据",
                type: "map",
                map: "丹东", // 自定义扩展图表类型
                aspectScale: 1,
                zoom: 0.65, // 缩放
                showLegendSymbol: true,
                label: {
       
                  normal: {
       
                    show: true,
                    textStyle: {
        color: "#fff", fontSize: "120%" },
                  },
                  emphasis: {
       
                    show: false,
                  },
                },
                itemStyle: {
       
                  normal: {
       
                    areaColor: {
       
                      type: "linear",
                      x: 1200,
                      y: 0,
                      x2: 0,
                      y2: 0,
                      colorStops: [
                        {
       
                          offset: 0,
                          color: "rgba(3,27,78,0.75)", // 0% 处的颜色
                        },
                        {
       
                          offset: 1,
                          color: "rgba(58,149,253,0.75)", // 50% 处的颜色
                        },
                      ],
                      global: true, // 缺省为 false
                    },
                    borderColor: "#fff",
                    borderWidth: 0.2,
                  },
                  emphasis: {
       
                    show: false,
                    color: "#fff",
                    areaColor: "rgba(0,254,233,0.6)",
                  },
                },
                layoutCenter: ["50%", "50%"],
                layoutSize: "180%",
                markPoint: {
       
                  symbol: "none",
                },
                data: data,
              },
              {
       
                  type: 'lines',
                    zlevel: 2,
                    effect
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
    • 45
    • 46
    • 47
    • 48
    • 49
    • 50
    • 51
    • 52
    • 53
    • 54
    • 55
    • 56
    • 57
    • 58
    • 59
    • 60
    • 61
    • 62
    • 63
    • 64
    • 65
    • 66
    • 67
    • 68
    • 69
    • 70
    • 71
    • 72
    • 73
    • 74
    • 75
    • 76
    • 77
    • 78
    • 79
    • 80
    • 81
    • 82
    • 83
    • 84
    • 85
    • 86
    • 87
    • 88
    • 89
    • 90
    • 91
    • 92
    • 93
    • 94
    • 95
    • 96
    • 97
    • 98
    • 99
    • 100
    • 101
    • 102
    • 103
    • 104
    • 105
    • 106
    • 107
    • 108
    • 109
    • 110
    • 111
    • 112
    • 113
    • 114
    • 115
    • 116
    • 117
    • 118
    • 119
    • 120
    • 121
    • 122
    • 123
    • 124
    • 125
    • 126
    • 127
    • 128
    • 129
    • 130
    • 131
    • 132
    • 133
    • 134
    • 135
    • 136
    • 137
    • 138
    • 139
    • 140
    • 141
    • 142
    • 143
    • 144
    • 145
    • 146
    • 147
    • 148
    • 149
    • 150
    • 151
    • 152
    • 153
    • 154
    • 155
    • 156
    • 157
    • 158
    • 159
    • 160
    • 161
    • 162
    • 163
    • 164
    • 165
    • 166
    • 167
    • 168
    • 169
    • 170
    • 171
    • 172
    • 173
    • 174
    • 175
    • 176
    • 177
    • 178
    • 179
    • 180
    • 181
    • 182
    • 183
    • 184
    • 185
    • 186
    • 187
    • 188
    • 189
    • 190
    • 191
    • 192
    • 193
    • 194
    • 195
    • 196
    • 197
    • 198
    • 199
    • 200
    • 201
    • 202
    • 203
    • 204
    • 205
    • 206
    • 207
    • 208
    • 209
    • 210
    • 211
    • 212
    • 213
    • 214
    • 215
    • 216
    • 217
    • 218
    • 219
  • 相关阅读:
    8.RabbitMQ系列之RPC
    Live555(一)
    PostgreSQL docker compose安装配置
    JAVA要点
    Python小游戏14——雷霆战机
    开始在 Windows 上使用 Python(初学者)
    IDEA JRebel安装使用教程
    IDEA设置和相关快捷键记录汇总
    基于kubernetes平台微服务的部署
    装饰模式&职责链模式
  • 原文地址:https://blog.csdn.net/weixin_41290949/article/details/133197247