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

当地图有有面图层填充时,绘制组件在面上绘制不出现。 #2025

Closed
qq9321 opened this issue Nov 8, 2023 · 7 comments
Closed
Assignees

Comments

@qq9321
Copy link

qq9321 commented Nov 8, 2023

当地图上有填充的面图层时,绘制组件在面图层上面被覆盖了,在面图层外面是可以看到。
https://codesandbox.io/s/tender-forest-l4h4sn?file=/src/index.mjs 这是地址麻烦看下

Copy link
Contributor

github-actions bot commented Nov 8, 2023

Hi @qq9321, Please star this repo if you find it useful! Thanks ⭐!
你好 @qq9321。如果该仓库对你有用,可以 star 一下,感谢你的 ⭐!

@heiyexing
Copy link
Contributor

看上去不是 zIndex 的问题,而是渲染层级的问题

@heiyexing heiyexing reopened this Nov 8, 2023
@heiyexing
Copy link
Contributor

@lzxue

@qq9321
Copy link
Author

qq9321 commented Nov 8, 2023

那里面有没有办法设置层级呢,就像图层那样可以设置层级

@lzxue
Copy link
Contributor

lzxue commented Nov 8, 2023

那里面有没有办法设置层级呢,就像图层那样可以设置层级

water layer 的zIndex 先设置为 负数如-1

      const lakeLayer = new PolygonLayer({ autoFit: true,zIndex:-1 })

@heiyexing
Copy link
Contributor

          const drawControl = new DrawControl(scene, {
            position: 'topright',
            commonDrawOptions: {
              style: {
                point: {
                  options: {
                    zIndex: 1000,
                  },
                },
                line: {
                  options: {
                    zIndex: 1000,
                  },
                },
                polygon: {
                  options: {
                    zIndex: 1000,
                  },
                },
                dashLine: {
                  options: {
                    zIndex: 1000,
                  },
                },
                midPoint: {
                  options: {
                    zIndex: 1000,
                  },
                },
              },
            },
          });

@qq9321
Copy link
Author

qq9321 commented Nov 8, 2023

          const drawControl = new DrawControl(scene, {
            position: 'topright',
            commonDrawOptions: {
              style: {
                point: {
                  options: {
                    zIndex: 1000,
                  },
                },
                line: {
                  options: {
                    zIndex: 1000,
                  },
                },
                polygon: {
                  options: {
                    zIndex: 1000,
                  },
                },
                dashLine: {
                  options: {
                    zIndex: 1000,
                  },
                },
                midPoint: {
                  options: {
                    zIndex: 1000,
                  },
                },
              },
            },
          });
这样不行,上面的他说设置为负数可以

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

No branches or pull requests

3 participants