This is example of generating, displaying and data change tracking of vector tiles (Mapbox Vector Tile format).
- PostgreSQL with PostGIS
- Node.js
Initialize database
psql -v ON_ERROR_STOP=ON -U postgres -f db/init.sqlCreate tables, load data and create triggers
psql --single-transaction -v ON_ERROR_STOP=ON -U tileset -c '\i db/tables.sql' -c '\i db/data.sql' -c '\i db/triggers.sql'Adjust connection
- Replace
<YOUR_DB_HOST>placeholder in.envfile with your own value. - Replace
<YOUR DB_PASSWORD>placeholder in.envfile with your own value, if your database setting requires password authentication and change password:
psql -U tileset -c "ALTER ROLE tileset WITH PASSWORD '<YOUR DB_PASSWORD>'"The data in the database is stored as follows:

Install dependencies
npm ciBuild bundles
npm run buildRelationships between CTEs and style layers:

Run application server
node ./server/app-server.jsRun static server (in new terminal tab)
node ./server/static-server.jsOpen in a browser
http://localhost:3000The map should looks like this:

Full example: Topohub.kz
Changes in the data are tracked. Based on a specific tileset and zoom range of a layer, the tiles impacted by these changes are calculated.
