Skip to content

Examples

The examples directory of the repository contains complete programs that use mapli:

Example Shows
Concurrent thumbnails Rendering several images at the same time with the async API
FastAPI web API Serving map images and XYZ tiles over HTTP
Private bucket with obstore Rendering a PMTiles archive from a private object storage bucket, through a custom URL scheme
Untrusted styles Rendering styles submitted by users, while only allowing them to fetch URLs from an allow list

The examples use dependencies from the dev dependency group. To run them from a clone of the repository:

uv sync --group dev

On a machine without a display, prefix the commands with xvfb-run -a, see System requirements.