initializeFromBase64
The most convenient way to initialize geos.js
module.
The .wasm file is embedded directly into the .js file as a base64 string.
Although convenient, this causes a certain penalty during initial initialization
due to base64 to binary conversion and ~33% overhead of .wasm file size.
Note that the returned module is just stateless, compiled WebAssembly code.
WebAssembly.Module
could be shared with another worker or window via postMessage
.
Returns
Promise<WebAssembly.Module>
A Promise that resolves with the WebAssembly.Module
See also
initialize
initializesgeos.js
module from a fetch request or already compiled moduleterminate
terminates initializedgeos.js
instance
Examples
in any environment
await initializeFromBase64();