MapTiler Desktop Pro package includes MapTiler Engine - a command-line utility that provides access to the full functionality of MapTiler Desktop Pro. You can also run it in Docker and use it on basically any Linux distribution in a matter of a few simple commands. This article will show you how to do it.
MapTiler Engine is a command-line interface for MapTiler Desktop Pro. It gives you access to the full potential of the GUI application from the command line. This makes it possible to integrate MapTiler Desktop into more complex geodata processing pipelines.
The bare minimum to render a map to a folder with MapTiler Engine is this command:
To process multiple files at once, just specify them one after another:
maptiler without any arguments or using the
-help switch will print out all available usage options. For more details on advanced usage of MapTiler Engine, please consult the command reference guide.
Running in Docker
Alongside every release of MapTiler Desktop, we also release a MapTiler Engine Docker image. This is a very convenient solution to use MapTiler Desktop Pro on cloud computing platforms such as Google Compute Engine or Amazon EC2.
All MapTiler Engine Docker images are available in the MapTiler Docker Hub repository.
The most basic command to run MapTiler Engine in Docker would look like this:
Running this command will print the MapTiler Engine usage help in your terminal. Let’s now break it down and explain its subsequent parts:
docker run- creates a Docker container layer based on the specified image.
-ti- enables an interactive shell so you can use
bashinside the created container.
--rm- tells Docker to automatically remove the container upon exiting.
-v $(pwd):/data- maps the current working directory to the
/datadirectory inside the Docker container. This directory is writable, all relative paths and bash autocomplete from your local machine are available. The rendering results will persist in the working directory when Docker exits.
maptiler/engine- the name of the Docker image. Providing just the image name will pull the latest version from the repository. In case you need to use an older version, use
:<version>after the image name. For example, to use version 11.2, type
maptiler -help- this is the place where you provide the actual commands for MapTiler Engine.
Using your MapTiler Desktop Pro license key
Executing the command as explained above will run MapTiler Engine in demo mode. Demo mode has all the features of the Pro version, but the output tiles will have an embedded watermark. To use your purchased MapTiler Desktop Pro license key, you need to pass it to Docker using the
MAPTILER_LICENSE environment variable. This is done by adding the
-e MAPTILER_LICENSE=<license_key> parameter to the command.
A complete command to render a map from an input image would look like this:
For the time being, running MapTiler Engine in Docker supports only online activation via environment variable. The software will be automatically deactivated upon exiting.
To increase ease of use, you can create a
bash alias to run MapTiler Engine in Docker:
Then, to process your geodata, just run:
In this article, we have presented MapTiler Engine and its basic usage. We have also shown you how to properly run MapTiler Engine in Docker and use your purchased MapTiler Desktop Pro license with it.