-
Notifications
You must be signed in to change notification settings - Fork 154
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
wind layer bounds decrease as zoom increases #185
Comments
@crawld It would be a good idea to provide an example, in fact the example in the example file has had some other processing done to avoid example rendering problems when zooming in on the map,See https://blog.sakitam.com/wind-layer/guide/#windcore-%E5%8F%82%E6%95%B0%E8%AF%B4%E6%98%8E for details on the velocityScale parameter |
Here's how I create wind-layer:
There is only a single value in the u/v data since I want a constant wind direction and speed over the domain. |
I'm using mapbox-gl 2.8.0. When I switch to 1.8.0 (used by @sakitam-gis/mapbox-wind) the problem does not occur. Have you tested with mapbox-gl 2.x? |
@crawld I haven't tested mapbox-gl 2.x in detail, but I'm guessing that you want the particle velocity to be moving at a constant rate, so you should configure velocityScale to be a fixed value (since constant velocity * time per unit = geographic distance traveled is fixed in the normal case, then the map will see the particles moving faster when zoomed in), configured as a function This is for demonstration purposes, as the movement of the example will be linear at a large level. |
Thanks @sakitam-fdd. The particle velocity is not important at different zoom levels for my use case. It's much more important that particles are drawn over the area for all zoom levels. |
@crawld Can you easily attach a minimal example? it seems to look fine when I test it under 2.15.0 https://codepen.io/sakitam-fdd/pen/gOZMEXb |
Did this get fixed? I found it only seem to occur when 3d terrain was enabled. |
@crawld Very sorry, currently all layers in Mapbox cannot be used with terrain or non Mercator projections;Before the mapbox official release of more APIs, all implementations were very difficult |
I'm using wind-layer with mapbox-gl to draw a wind field over a small area. At low zoom levels, it looks correct, but when I increase the zoom, the layer is not drawn at the bottom.
This image shows the layer over the correct area, and is covering the black polygon:
But once I zoom in, the layer no longer covers the area. Here the layer does not cover the bottom of the black polygon:
The layer seems to shrink the more I zoom in.
The text was updated successfully, but these errors were encountered: