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

Allow usage of prerender and postrender on raster imageries #1015

Open
hy31337 opened this issue Mar 10, 2023 · 2 comments
Open

Allow usage of prerender and postrender on raster imageries #1015

hy31337 opened this issue Mar 10, 2023 · 2 comments

Comments

@hy31337
Copy link

hy31337 commented Mar 10, 2023

.

@hy31337
Copy link
Author

hy31337 commented Mar 11, 2023

    this.baseLayers.forEach((base) => {
      base.on("prerender", (event) => {
        let vectorContext = getVectorContext(event);
        let ctx = event.context;
        ctx.save();
        vectorContext.drawFeature(clipFeature, style); // 可以对边界设置一个样式
        event.context.globalCompositeOperation = "source-over";
        ctx.clip();
      });
      base.on("postrender", (event) => {
        let ctx = event.context;
        ctx.restore();
      });
      base.setExtent(clipFeature.getGeometry().getExtent());
    });

@gberaudo
Copy link
Member

Hi @hy31337, what you are trying to do is not supported right now.
Can you give an example about how it should display?

@gberaudo gberaudo changed the title 大佬 openlayer结合OLCesium 做成3D后,裁边变成一个方块了--裁边区域边界最大范围,没有细微轮廓,有什么办法解决吗 Allow usage of prerender and postrender on raster imageries Apr 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants