apache / echarts

Apache ECharts is a powerful, interactive charting and data visualization library for browser
https://echarts.apache.org
Apache License 2.0
60.61k stars 19.62k forks source link

China map 里 使用nameMap做国际化映射,南海诸岛映射有问题 #9066

Closed tonny-chan closed 4 years ago

tonny-chan commented 6 years ago

One-line summary [问题简述]

China map 里 使用nameMap做国际化映射,只有南海诸岛映射不成功

Version & Environment [版本及环境]

Expected behaviour [期望结果]

使用 nameMap可以把'南海诸岛'映射为'South China Sea Islands'

ECharts option [ECharts配置项]

option = {
    geo: {
        map: 'china',
        top: 70,
        zoom: 0.85,
        scaleLimit: {
            max: 2,
            min: 0.75
        },
        roam: true, //scale, move
        label: {
            show: true,
            color: '#2c7778',

            emphasis: {
                show: true,
                color: '#2c7778',
            }
        },
        itemStyle: {
            normal: {
                areaColor: '#000',
                borderColor: '#50E0E3'
            },
            emphasis: {
                areaColor: '#222',
                borderColor: '#50E0E3'
            }
        },
        //地图中,地名中英文映射(国际化)
        nameMap: {
            '安徽': 'Anhui',
            '北京': 'Beijing',
            '福建': 'Fujian',
            '甘肃': 'Gansu',
            '广东': 'Guangdong',
            '广西': 'Guangxi',
            '贵州': 'Guizhou',
            '海南': 'Hainan',
            '河北': 'Hebei',
            '河南': 'Henan',
            '黑龙江': 'Heilongjiang',
            '湖北': 'Hubei',
            '湖南': 'Hunan',
            '吉林': 'Jilin',
            '江苏': 'Jiangsu',
            '江西': 'Jiangxi',
            '辽宁': 'Liaoning',
            '内蒙古': 'Inner Mongolia',
            '宁夏': 'Ningxia',
            '青海': 'Qinghai',
            '山东': 'Shandong',
            '山西': 'Shanxi',
            '陕西': 'Shaanxi',
            '上海': 'Shanghai',
            '四川': 'Sichuan',
            '天津': 'Tianjin',
            '西藏': 'Tibet',
            '新疆': 'Xinjiang',
            '云南': 'Yunnan',
            '浙江': 'Zhejiang',
            '重庆': 'Chongqing',
            '澳门': 'Macao',
            '香港': 'Hong Kong',
            '台湾': 'Taiwan',
            '南海诸岛': 'South China Sea Islands'
        }
    },
    series: []
}

Other comments [其他信息]

tonny-chan commented 6 years ago

pissang, 有解决方案了吗?

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.