echarts3D地球的lines3D数组中设置的海拔高度没有用

cgh8pdjw  于 2022-11-13  发布在  Echarts
关注(0)|答案(2)|浏览(369)

Version

4.5.0

Steps to reproduce

var dom = document.getElementById("container");
    var myChart = echarts.init(dom);
    var app = {};
    option = null;

    myChart.setOption({
        backgroundColor: '#000',
        globe: {
            baseTexture: '../static/img/echarts_world.jpg',
            heightTexture: '../static/img/echarts_composite_4k.jpg',

            shading: 'lambert',

            light: {
                ambient: {
                    intensity: 0.4
                },
                main: {
                    intensity: 0.4
                }
            },

            viewControl: {
                autoRotate: false
            }
        },
        series: {

            type: 'lines3D',

            coordinateSystem: 'globe',

            blendMode: 'lighter',

            lineStyle: {
                width: 1,
                color: '#fff',
                opacity: 1
            },

            data: [
                [
                    [145.391881, -6.081689,50],
                    [145.7887, -100.207083,50]
                ],
                [
                    [145.7887, -100.207083,50],
                    [-50.1995, 32.7552,50]
                ],
                [
                    [145.391881, -6.081689,50],
                    [-50.1995, 32.7552,50]
                ]
            ]
        }
    });

    if (option && typeof option === "object") {
        myChart.setOption(option, true);
    }

What is expected?

画的线应该距离地球有距离

What is actually happening?

与海拔高度设为0没有任何区别

fsi0uk1n

fsi0uk1n1#

Hi! We've received your issue and please be patient to get responded. 🎉
The average response time is expected to be within one day for weekdays.

In the meanwhile, please make sure that you have posted enough image to demo your request. You may also check out the API and chart option to get the answer.

If you don't get helped for a long time (over a week) or have an urgent question to ask, you may also send an email to dev@echarts.apache.org . Please attach the issue link if it's a technical questions.

If you are interested in the project, you may also subscribe our mail list .

Have a nice day! 🍵

f45qwnt8

f45qwnt82#

遇到相同问题啦 不知道解决了没有 v5.2.1 ``

对应海拔高度的说明:https://echarts.apache.org/zh/option-gl.html#series-lines3D.data

对应的说明:

三维飞线图的数据数组,通常数据的每一项可以是一个包含起点和终点的坐标集。在 polyline 设置为 true 时支持多于两个的坐标。 如下:

data: [
    [
        [120, 66, 1], // 起点的经纬度和海拔坐标
        [122, 67, 2]  // 终点的经纬度和海拔坐标
    ]
]

如下图所示,调整数组的第三个参数,白线的高度没有发生变化

对应的 polyline: true

参考示例: https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/examples/data-gl/asset/data/flights.json
对高度的设置是

相关问题