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

基于mapbox的风场,用map.addLayer添加如何达到和addTo方法一样的效果? #219

Open
Muzilcy opened this issue Jun 20, 2024 · 2 comments

Comments

@Muzilcy
Copy link

Muzilcy commented Jun 20, 2024

现在直接使用map.addLayer可以添加,但是交互后,所有图层会重新渲染,如下图
image

@sakitam-fdd
Copy link
Owner

@Muzilcy 目前旧版的没办法支持哈,因为旧版的风场实现是在 mapbox 的地图上盖了一个 canvas,具体的实现在这里 https://github.com/sakitam-fdd/wind-layer/blob/v1.1.1-alpha.2/packages/mapbox-gl/src/Overlay.ts

这个自定义的 CanvasOverlay实现了 mapbox 的 CustomInterface ,但是 mapbox 自定义图层的 render 调用是很频繁的,所以不能使用 addLayer 来添加。

2.0 之后有了新的实现,感兴趣的话可以看下
https://blog.sakitam.com/wind-layer/guide/data.html

https://blog.sakitam.com/wind-layer/playgrounds/mapbox-gl/colorize.html

@Muzilcy
Copy link
Author

Muzilcy commented Aug 7, 2024

@sakitam-fdd 你好,请问mapbox-wind.js支持哪些坐标系?

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