diff --git a/README.md b/README.md index 9c3b4e7..7533185 100644 --- a/README.md +++ b/README.md @@ -14,8 +14,8 @@ This tool can be used in the following ways: * Via CLI (npm, Node.js or Docker) * Using a [Github template](https://github.com/digidem/map-template) to generate tiles using a `manifest.json`. -* As a task worker service to poll a queue for new requests. - * Currently supported: Azure Storage Queue. +* As a task worker service to poll a queue for new requests, and update a database table with the render results. + * Currently supported: Azure Storage Queue and PostgreSQL. * The tool may be extended with RabbitMQ for self-hosting in the future. To install the tool using npm, run: @@ -146,7 +146,9 @@ docker run -it --rm -v "$(pwd)":/app/outputs/ mapgl-tile-renderer --style "mapbo ## Azure Storage Queue example usage -For Azure Storage Queue (and other queue services in the future), mapgl-tile-renderer expects a message with a JSON body, composed of the input options: +mapgl-tile-renderer is set up to listen for messages from a queue service, as submitted via [map-packer](https://github.com/conservationMetrics/map-packer/), and update a PostgreSQL table with the render results. + +For Azure Storage Queue (and other queue services in the future), mapgl-tile-renderer expects a message with a JSON body, composed of the various input options. Example: ```json { @@ -155,10 +157,13 @@ For Azure Storage Queue (and other queue services in the future), mapgl-tile-ren "bounds": "-79,37,-77,38", "minZoom": 0, "maxZoom": 8, - "output": "bing" + "outputFilename": "bing" + "outputDir": "/maps" } ``` +Note that `outputDir` likely needs to be a volume mount directory on your mapgl-tile-renderer container, so that it can be accessed by map-packer or other tools for sharing and downloading. + ## Running with Github Actions To use the Github Actions workflow defined in `.github/workflows/gen-tiles-input.yml` for generating tiles, follow these steps: diff --git a/src/azure_queue_service.js b/src/azure_queue_service.js index fefc6bb..f194ad9 100644 --- a/src/azure_queue_service.js +++ b/src/azure_queue_service.js @@ -68,7 +68,7 @@ const processQueueMessages = async () => { monthYear, overlay, openStreetMap, - outputDir = "maps/", + outputDir = "/maps", bounds, minZoom = 0, maxZoom,