Replies: 2 comments 2 replies
-
You either need to pass the relevant data to the worker to do the calculations or store it in the worker and then query it. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hi, thanks for your fast reply! |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there,
i am not quite sure if its the right place to ask, if not, i am sorry ;)
i am using maplibre in a project where i have to calculate some long(er) running processes which depend on the current loaded terrain in the viewport. On each resolution change of the terrain i get a nasty block of the main thread.
a simple function would be something like this (a lot of times ;) ):
that works nice as expected.
the issue i cannot get my head around is, that i need this kind of a function in a worker. i need the current map in the worker to do some calculation which depend on for example the current terrain.
since i cannot convert
map
into a transferable object how would i do that? Is there any kind of shared memory available to use for thinks like that?I am sure someone had a similar problem and can share how i would have to deal with this problem.
thanks a lot,
pcace
Beta Was this translation helpful? Give feedback.
All reactions