QGIS core ported to WebAssembly to run it on the web platform
Version: 0.0.5
(based on QGIS 3.32.1)
qgis-js Repository | qgis-js Website
β οΈπ§ͺ Work in progress! Currently this project is in public beta and only does very basic things like loading a QGIS project and rendering it to an image (see Features and Limitations)
π±π Help wanted! Please try out your QGIS projects and report issues and ideas on GitHub. We are also warmly welcoming contributions to this project (see Contributing)
This project provides recipes to compile QGIS core and its dependencies to WebAssembly using Emscripten, CMake and vcpkg.
qgis-js provides a JavaScript/TypeScript API to interact with QGIS, load projects and render beautiful QGIS-based maps on the web platform (see Features).
Please note that our focus is currently on making the QGIS core usable. The project does not aim to bring the full QGIS desktop application, GUI library, or Python bindings (see Limitations).
π See the qgis-js Website or
./docs
for more detailed information
Package | Description | npm |
---|---|---|
qgis-js | The qgis-js API (which also ships the .wasm binary) |
|
@qgis-js/ol | OpenLayers sources to display qgis-js maps | |
@qgis-js/utils | Utilities to integrate qgis-js into web applications |
Example | Source code | StackBlitz |
---|---|---|
π Using the qgis-js API example | docs/examples/qgis-js-example-api |
|
πΊοΈ Minimal OpenLayers example | docs/examples/qgis-js-example-ol |
A modern desktop browser is needed. At the moment we only support/test Chromium-based browsers (>= 95) and Firefox (>= 100)
π See docs/compatibility.md for more details
This project is a work in progress. Currently it provides the following features:
Compared to the native build of QGIS, there are various limitations:
π‘ NOTE: To just use qgis-js you don't need to build it yourself, you can install it from npm. See the provided Packages.
sudo apt-get install pkg-config ninja-build flex bison
npx pnpm install
This will also invoke
./qgis-js.ts -v install
on "postinstall" which
- downloads and installs emsdk in
build/emdsk
- downloads and installs vcpkg in
build/vcpkg
- boostraps vcpkg and downlaod the ports sources
see also
build/scripts/install.sh
for manual installation
npm run compile
- Can also be ivoked with
compile:debug
orcompile:release
, see Build types- Will take about 30 minutes on a modern machine to compile all the vcpkg ports during the first run... β
- see also
build/scripts/compile.sh
for manual compiltion
qgis-js
packagesYou want to compile with a Release
build type first
npm run compile:release
After successful compilation, you can build the packages with Vite:
npm run build
You probably want to compile with a Dev
or Debug
build type first
npm run compile:dev
Start a Vite development server:
npm run dev
Open your browser at http://localhost:5173
Library | License | Links |
---|---|---|
double-conversion (3.3.0) Efficient binary-decimal and decimal-binary conversion routines for IEEE doubles. |
Website - Source code | |
egl-registry (2022-09-20) the EGL API and Extension Registry |
Website - Source code | |
exiv2 (0.28.1) Image metadata library and tools |
GPL-2.0-or-later | Website - Source code |
expat (2.6.0) XML parser library written in C |
MIT | Website - Source code |
freetype (2.13.2) A library to render fonts. |
FTL OR GPL-2.0-or-later | Website - Source code |
gdal (3.7.1) The Geographic Data Abstraction Library for reading and writing geospatial raster and vector data |
Website - Source code | |
geos (3.11.3) Geometry Engine Open Source |
LGPL-2.1-only | Website |
gumbo (0.10.1) An HTML5 parsing library in pure C99 |
Apache-2.0 | Website - Source code |
inih (57) Simple .INI file parser |
BSD-3-Clause | Website - Source code |
json-c (2023-08-12) A JSON implementation in C |
MIT | Website - Source code |
libgeotiff (1.7.1) Libgeotiff is an open source library on top of libtiff for reading and writing GeoTIFF information tags. |
MIT | Website - Source code |
libiconv (1.17) GNU Unicode text conversion |
Website | |
libjpeg-turbo (3.0.2) libjpeg-turbo is a JPEG image codec that uses SIMD instructions (MMX, SSE2, NEON, AltiVec) to accelerate baseline JPEG compression and decompression on x86, x86-64, ARM, and PowerPC systems. |
BSD-3-Clause | Website - Source code |
liblzma (5.4.4) Compression library with an API similar to that of zlib. |
Website - Source code | |
libpng (1.6.40) libpng is a library implementing an interface for reading and writing PNG (Portable Network Graphics) format files |
libpng-2.0 | Website - Source code |
libspatialindex (1.9.3) C++ implementation of R*-tree, an MVR-tree and a TPR-tree with C API. |
MIT | Website - Source code |
libzip (1.10.1) A library for reading, creating, and modifying zip archives. |
BSD-3-Clause | Website - Source code |
litehtml (0.6.0) litehtml is the lightweight HTML rendering engine with CSS2/CSS3 support. |
BSD-3-Clause | Website - Source code |
nlohmann-json (3.11.3) JSON for Modern C++ |
MIT | Website - Source code |
opengl-registry (2022-09-29) the API and Extension registries for the OpenGL family APIs |
Website - Source code | |
opengl (2022-12-04) Open Graphics Library (OpenGL)[3][4][5] is a cross-language, cross-platform application programming interface (API) for rendering 2D and 3D vector graphics. |
||
pcre2 (10.42) Regular Expression pattern matching using the same syntax and semantics as Perl 5. |
BSD-3-Clause | Website - Source code |
proj (9.3.1) PROJ library for cartographic projections |
MIT | Website - Source code |
protobuf (3.21.12) Protocol Buffers - Google's data interchange format |
BSD-3-Clause | Website - Source code |
qca (2.3.7) Qt Cryptographic Architecture (QCA). |
Website - Source code | |
qgis (3.32.1) QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS) |
GPL-2.0 | Website - Source code |
qt5compat (6.6.1) The module contains unsupported Qt 5 APIs |
Website | |
qtbase (6.6.1) Qt Application Framework Base Module. Includes Core, GUI, Widgets, Networking, SQL, Concurrent and other essential qt components. |
Website | |
qtkeychain (0.14.0) (Unaffiliated with Qt) Platform-independent Qt5 API for storing passwords securely |
BSD-3-Clause | Website - Source code |
qtsvg (6.6.1) Qt SVG |
Website | |
qttools (6.6.1) Qt Tools |
Website | |
sqlite3 (3.45.0) SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine. |
blessing | Website |
tiff (4.6.0) A library that supports the manipulation of TIFF image files |
libtiff | Website - Source code |
zlib (1.3.1) A compression library |
Zlib | Website - Source code |
Dev
build typeCMAKE_BUILD_TYPE
in CMakeDebug
build typeDev
build typeCMAKE_BUILD_TYPE=Debug
in CMakeRelease
build typeDev
build typeCMAKE_BUILD_TYPE=Release
in CMakeContributions welcome, see CONTRIBUTING.md for how to get started