web_worker library

The other half of VmapEngine.useWebWorker: what the worker script runs.

A browser gives Dart one thread, so without a worker tiles are built and label glyphs drawn on the page's own. tool/build_web_worker.dart compiles this into the assets/vmap_worker.js vmap ships. Only a web build can import this library.

Functions

runVmapWorker() → void
Builds tiles, or draws label glyphs, for the page that started this worker, as the first message it is sent asks.