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

How to limit the number of web Worker create by mapbox-gl-js? #7810

Closed
AlanKnightly opened this issue Jan 24, 2019 · 1 comment
Closed

How to limit the number of web Worker create by mapbox-gl-js? #7810

AlanKnightly opened this issue Jan 24, 2019 · 1 comment

Comments

@AlanKnightly
Copy link

I run into a problem that when testing on UC browser (device: iphone6s) , the code below:
new mapboxgl.Map(opt);

It will throw an error: QuotaExceededError:Failed to construct 'Worker': Maximum worker number has been reached.
Is there any way to control or limit the number of workers for mapboxjs to solve this problem? I cant find any relative option from the doc

@mourner
Copy link
Member

mourner commented Jan 24, 2019

You can limit the number of workers by setting mapboxgl.workerCount = <number>; before instantiating any maps, but we forgot to document this — good catch! Will be fixed by #7812.

@mourner mourner closed this as completed Jan 24, 2019
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