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

PolygonLayer mousemove 闪烁 变黑 #2606

Open
guzicheng90 opened this issue Aug 30, 2024 · 9 comments
Open

PolygonLayer mousemove 闪烁 变黑 #2606

guzicheng90 opened this issue Aug 30, 2024 · 9 comments
Assignees
Labels
bug 这个是一个 bug

Comments

@guzicheng90
Copy link

问题描述

_2024_08_30_16_49_13_141.mp4

代码如下:

   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

平台

  • 操作系统: [macOS, Windows, Linux, React Native ...]
  • 网页浏览器: [Google Chrome, Safari, Firefox]

屏幕截图或视频(可选)

No response

补充说明(可选)

No response

Copy link
Contributor

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

@lvisei lvisei added the 🤔 need reproduce issue 需要一个在线复现链接 label Aug 30, 2024
Copy link
Contributor

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
Copy link
Member

lvisei commented Aug 30, 2024

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

@guzicheng90
Copy link
Author

guzicheng90 commented Aug 31, 2024

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

_2024_08_31_13_39_29_112.mp4

@lvisei
Copy link
Member

lvisei commented Sep 3, 2024

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

链接不可访问~

@guzicheng90
Copy link
Author

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

@lvisei
Copy link
Member

lvisei commented Sep 5, 2024

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

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

@lvisei
Copy link
Member

lvisei commented Sep 5, 2024

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

@guzicheng90
Copy link
Author

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

@lvisei lvisei added bug 这个是一个 bug and removed 🤔 need reproduce issue 需要一个在线复现链接 labels Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 这个是一个 bug
Projects
None yet
Development

No branches or pull requests

2 participants