Replies: 7 comments
-
Can you elaborate what problem you are trying to solve? Or what limitation did you find? |
Beta Was this translation helpful? Give feedback.
-
In this official example, custom layers are not rendered in multiple world copies. https://maplibre.org/maplibre-gl-js/docs/examples/custom-style-layer/
|
Beta Was this translation helpful? Give feedback.
-
The layers that come with the framework, such as the image layer, will render multiple copies in the world copy. How can I achieve this in a custom layer? |
Beta Was this translation helpful? Give feedback.
-
In order to solve this I added 2 more buffers with coordinates that are unwrapped (+360, -360 longitude) and drew them as well. |
Beta Was this translation helpful? Give feedback.
-
I think I solved this problem,There are 3 steps to solve this problem
This will get an array worldOffsets: […,-1,0,1…]
|
Beta Was this translation helpful? Give feedback.
-
There was an issue at the Mapbox repo about this here: Possibly helpful. |
Beta Was this translation helpful? Give feedback.
-
The cause of this problem is due to rendering the map in mercator method. Since mapbox and maplibre are tile-based maps, the above problem does not occur by rendering all the tiles currently visible, but as far as I know, the tile information is not provided in the custom layer. This issue shares a similar context to what I asked above in this discussion |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Question
How to implement renderWorldCopies in a custom layer? This is not implemented in the official examples. Does anyone have any ideas for implementation?
Links to related documentation
https://maplibre.org/maplibre-gl-js/docs/examples/custom-style-layer/
Beta Was this translation helpful? Give feedback.
All reactions