This web application creates legend images for vector tile styles, based on the MapLibre style specification.
See full examples of legend images for a color map and a grayscale map, created with this web application for basemap.de.
To set up a local development environment you can follow these instructions.
You need a current version of Node.js and npm package manager.
Clone this repository and navigate to the project folder. Then install the dependencies:
npm install
Parcel is used as build tool. Run the Parcel development server:
npm start
Now you can open the application in a browser: http://localhost:1234
Build the application:
npm run build
Test the application:
npm run test
Linting JavaScript code (with or without fixing errors):
npm run lint
npm run lint:fix
Navigate to the project folder, build a Docker image and start a container on port 80:
docker build -t vt-legend .
docker run --rm -p 80:80 vt-legend:latest
Build and start with Docker Compose:
docker-compose up --build
Now you can open the compiled version of the application in a browser: http://localhost
You can find more details about the customization of the legend in the configuration documentation.
Licensed under the European Union Public License (EUPL). For more information see LICENSE.txt.
Copyright 2022-2024 Landesamt für Geoinformation und Landesvermessung Niedersachsen