tree: 3dad0af9fb28a79c3dbb67f65c694bfea3f0fc22 [path history] [tgz]
  1. assets/
  2. src/
  3. .gitignore
  4. .prettierignore
  5. .prettierrc.json
  6. declaration.d.ts
  7. package-lock.json
  8. package.json
  9. README.md
  10. tsconfig.json
baremaps-renderer/README.md

Installation

First, install the required dependencies:

npm install

Then, build the project:

npm run build

You can then link the script to your path in order to use it as a command line tool:

npm link

Usage

In order to get a list of the available commands, run:

baremaps-renderer --help

Running the Tests

Within a directory containing a tests folder, you can run the tests by running:

baremaps-renderer run -s <styleUrl>

After the tests are run, a report is generated tests/report.html. You can view the report by opening the file in your browser or by running:

baremaps-renderer report --open

Creating a New Test

Within a directory containing a tests folder, you can add a new test by creating a folder in the tests/integration directory. Each test is a folder containing a metadata file metadata.json. The metadata file is as follows:

{
  "width": 512,
  "height": 512,
  "center": [6.6323, 46.5197],
  "zoom": 14
}
  • width: the width of the image in pixels
  • height: the height of the image in pixels
  • center: the center of the map longitude, latitude
  • zoom: the zoom level of the map