diff --git a/docs/config.rst b/docs/config.rst index d556dfa..709a125 100644 --- a/docs/config.rst +++ b/docs/config.rst @@ -258,6 +258,10 @@ For example:: "source1": { "url": "mbtiles://source1.mbtiles", "type": "vector" + }, + "terrain": { + "url": "mbtiles://terrain.mbtiles", + "encoding": "mapbox" } } @@ -265,6 +269,8 @@ Alternatively, you can use ``mbtiles://{source1}`` to reference existing data ob In this case, the server will look into the ``config.json`` to determine what file to use by data id. For the config above, this is equivalent to ``mbtiles://source1.mbtiles``. +If you use terrain tiles, it is possible to configure an ``encoding`` with ``mapbox`` or ``terrarium`` to enable a terrain preview mode and the ``elevation`` api for the ``data`` endpoint. + PMTiles ------- diff --git a/docs/endpoints.rst b/docs/endpoints.rst index 93230a6..12f1acf 100644 --- a/docs/endpoints.rst +++ b/docs/endpoints.rst @@ -100,6 +100,14 @@ Source data * TileJSON at ``/data/{id}.json`` + * If terrain mbtile data is served and ``encoding`` is configured (see config) the elevation can be queried + + * by ``/data/{id}/elevation/{z}/{x}/{y}`` for the tile + + * or ``/data/{id}/elevation/{z}/{long}/{lat}`` for the coordinate + + * the result will be a json object like ``{"z":7,"x":68,"y":45,"red":134,"green":66,"blue":0,"latitude":11.84069,"longitude":46.04798,"elevation":1602}`` + Static files =========== * Static files are served at ``/files/{filename}``