Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

单独设置区域里的borderColor不起作用 #497

Open
liuxiaoqiang1018 opened this issue Jun 26, 2023 · 2 comments
Open

单独设置区域里的borderColor不起作用 #497

liuxiaoqiang1018 opened this issue Jun 26, 2023 · 2 comments

Comments

@liuxiaoqiang1018
Copy link

liuxiaoqiang1018 commented Jun 26, 2023

单独设置区域里的 regions.itemStyle.borderColor不起作用

<!-- 首页3D地图 -->
<!-- map json https://geo.datav.aliyun.com/areas_v3/bound/370200_full.json -->
<template>
  <div class="home-map-root">
    <div class="home-map" ref="homeMap" id="homeMap">homeMap</div>
  </div>
</template>

<script>
import { qing_tao_map_json } from '../../json/map_json.js'
import 'echarts-gl';

export default {
  data() {
    return {
    }
  },
  created() {
  },
  mounted() {
    this.$echarts.registerMap("QingTaoMap", qing_tao_map_json);
    let mEcharts = this.$echarts.init(this.$refs.homeMap);
    let option = {
      geo3D: {
        // 将geo3d放在最底层
        zlevel: -1,
        map: 'QingTaoMap',
        regionHeight: 1,//区域的高度,通俗点说就是厚度

        itemStyle: {
          height: 1,
          color: '#2B5890', //地图颜色
          borderWidth: 0.5, //分界线wdith
          borderColor: '#333', //分界线颜色
        },
        label: {
          show: true, //是否显示label
          color: '#fff', //文字颜色
          fontSize: 20, //文字大小
        },
        regions: [
          {
            name: '即墨区', // 区域名称
            height: 2,
            itemStyle: {
              borderWidth: 10, // 设置该区域的边缘宽度
              //****这个设置不起作用 */
              borderColor: "#ff0",//设置该区域的边缘颜色
              color: '#f00',// 设置该区域的背景颜色
            },
          },
        ],
      },
      title: {
      },

      series: [
      ],
    };

    mEcharts.setOption(option,true);
  },
  methods: {
  },
}
</script>
<style scoped lang='less'>
.home-map-root {
  height: 100%;
  width: 100%;
}

.home-map {
  height: 100%;
  width: 17.5rem;
  // background-color: blueviolet;
}
</style>

.

@helgasoft
Copy link

yes, textStyle for geo3D.label and geo3D.regions.label is redundant in v.5.5.0.
Workaround until fixed someday: use attributes (like color,fontSize) directly, without textStyle - Demo

@zz925625
Copy link

zz925625 commented May 9, 2024

ok;3q

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants