[Tile-serving] [openstreetmap/mod_tile] allow key=value parameters for AddTileConfig (PR #346)

Frederik Ramm notifications at github.com
Thu Oct 19 00:51:33 UTC 2023


AddTileConfig is a shorthand way of adding tile configs without a renderd.conf; if you use mod_tile with tirex, then you will typically not have a renderd.conf and hence rely on AddTileConfig.

AddTileConfig lacks the richness of renderd.conf configuration; you cannot, for example, configure differing max_zooms or file extensions or mime types.

To partly fix this problem, AddTileMimeConfig was introduced which takes one extra argument - misleadingly, not the MIME type, but the file extension, as a third parameter.

This approach is not scalable and difficult to use because of the positional parameters.

This pull request introduces optional key-value pairs for the AddTileConfig directive. You can now write

     AddTileConfig /tile tile mimetype=image/jpeg extension=jpg maxzoom=22
 
to configure your tile layer. Currently, "mimetype", "maxzoom", "minzoom", and "extension" are supported. 

This is totally backwards compatible, as old-style AddTileConfig directives will still work like they did before. 

The AddTileMimeConfig directive still works but it could be deprecated in favour of this new AddTileConfig syntax.
You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/mod_tile/pull/346

-- Commit Summary --

  * allow key=value parameters for AddTileConfig

-- File Changes --

    M src/mod_tile.c (48)

-- Patch Links --

https://github.com/openstreetmap/mod_tile/pull/346.patch
https://github.com/openstreetmap/mod_tile/pull/346.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/mod_tile/pull/346
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/mod_tile/pull/346 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20231018/6ef53231/attachment-0001.htm>


More information about the Tile-serving mailing list