Set up the TileDecoderService
. The name of the service must be unique
Service id. Must be unique.
Decoder to handle the decoding and info requests.
Service id. Must be unique.
Destroy the WorkerService
. Cancels all pending requests ad removes itself from the message
queue.
Handle incoming configuration message. Configuration message is passed on to decoder.
Handle incoming request messages. Identifies message type and processes the request.
Message that is either a DecodeTileRequest or a TileInfoRequest.
A promise which resolves to a WorkerServiceResponse.
Start a TileDecoderService with a given decoder.
Service id. Must be unique.
[[TileDecoder]] instance.
Generated using TypeDoc
An extension to WorkerService, the
TileDecoderService
implements an asynchronous (message based) service to decode tile content in web workers. TheTileDecoderService
itself lives in the web worker, and communicates with messages by means of a ConcurrentWorkerSet with the application.The
TileDecoderService
handles a DecodeTileRequest, which contains a tile and its freshly loaded binary data, decodes the content with the ITileDecoder that the service is configured to use, and sends the data back in form of a WorkerServiceResponse.