antvis / L7

🌎 Large-scale WebGL-powered Geospatial Data Visualization analysis engine.
https://l7.antv.antgroup.com
MIT License
3.63k stars 632 forks source link

PolygonLayer mousemove 闪烁 变黑 #2606

Open guzicheng90 opened 2 weeks ago

guzicheng90 commented 2 weeks ago

问题描述

https://github.com/user-attachments/assets/25759007-6917-4bf5-a7ef-8132dfd9a3f1

代码如下:

   testLayer(scene, data, (data) => {
        console.log('=====')
    })

    testLayer(scene, data, callback) {
        // 创建配置对象
        var guiConfig = {
            areaLayerSize: 150000, // 地块高度
            mapShow: false, // 地图是否显示
            textSize: 14, // 文字大小
            textColor: "#ffffff", // 文字颜色
            textStrokeWidth: 0.5, // 文字描边宽度
            textStrokeColor: '#000', // 文字描边颜色
            sourceColor: '#FFffff', // 地块侧边渐变色下
            sourceColorAlpha: 0.1, // 地块侧边渐变色透明度下
            targetColor: '#0DCCFF', // 地块侧边渐变色上
            targetColorAlpha: 1, // 地块侧边渐变色透明度上
            markerShow: false, // 是否显示标注
            chartShow: false, // 是否显示柱状图
            tooltipsShow: false, // 是否显示提示框
        };
        const randomColorsArray = [
            "#F2C94C", "#D62D20", "#800000", "#1F77B4", "#FF7F0E",
            "#2CA02C", "#17BECF", "#7F7F7F", "#BCBD22", "#E377C2",
            "#8C564B", "#9467BD", "#D62728", "#7FBF7B", "#C7C7C7",
            "#B3DE69", "#F4A582", "#9EDAE5", "#FF9896", "#98DF8A",
            "#C5B0D5", "#C49C94", "#FDBF6F", "#C7C7C7", "#FF9DA7",
            "#B2DF8A", "#FDB462", "#CAB2D6", "#FFFF99", "#FFC300",
            "#B15928", "#E7BA42", "#A05D56", "#F0E442", "#C0C0C0"
        ];
        // 行政区块
        const areaLayer = new PolygonLayer({
            name: 'areaLayer',
            autoFit: true
        })
            .source(data)
            .size(guiConfig.areaLayerSize)
            .shape('extrude')
            .color('name', randomColorsArray)
            // .active({
            //     color: 'rgb(100,230,255)',
            // })
            .style({
                heightfixed: true,
                pickLight: true,
                opacity: 1,
                sourceColor: '#ff0000',
                targetColor: '#0DCCFF',
            });

        scene.addLayer(areaLayer);
        areaLayer.on('mousemove', (data) => {
            console.log('000000000000000')
            // callback(data)
        })
        return areaLayer;
    }

重现链接

No response

重现步骤

No response

预期行为

No response

平台

屏幕截图或视频(可选)

No response

补充说明(可选)

No response

github-actions[bot] commented 2 weeks ago

Hi @guzicheng90, Please star this repo if you find it useful! Thanks :star:! 你好~ @guzicheng90 🌟 如果这个仓库对你有帮助,可以给我们点个star支持一下~你的支持对我们来说是最大的鼓励,感谢你的支持与点赞 🌟

github-actions[bot] commented 2 weeks ago

Hello @guzicheng90. Please provide a online reproduction by forking codesandbox of @antv/l7 demo template Issues labeled by Need Reproduce will be closed if no activities in 3 days.

你好 @guzicheng90, 我们需要你提供一个在线的重现实例以便于我们帮你排查问题。你可以通过点击这里创建一个 @antv/l7 demo 模板 3 天内未跟进此 issue 将会被自动关闭。

lvisei commented 2 weeks ago

codesanbox 上复现一下最简单问题示例

guzicheng90 commented 2 weeks ago

https://codesandbox.io/p/sandbox/l7-demo-forked-mjhcz4

https://github.com/user-attachments/assets/4f07fadd-b184-406e-a3be-5a09059fd9bf

lvisei commented 2 weeks ago

codesandbox.io/p/sandbox/l7-demo-forked-mjhcz4

链接不可访问~

guzicheng90 commented 1 week ago

不好意思 设为private了。。 请再试一下呢

lvisei commented 1 week ago

codesandbox.io/p/sandbox/l7-demo-forked-mjhcz4

没有复现,什么电脑有这个问题

lvisei commented 1 week ago

参考 #2595,切换渲染引擎试试

guzicheng90 commented 1 week ago

非常感谢 切换引擎后 问题解决