add documentation for elevation api
This commit is contained in:
parent
619c7f31e1
commit
21a25592d2
2 changed files with 14 additions and 0 deletions
|
@ -258,6 +258,10 @@ For example::
|
||||||
"source1": {
|
"source1": {
|
||||||
"url": "mbtiles://source1.mbtiles",
|
"url": "mbtiles://source1.mbtiles",
|
||||||
"type": "vector"
|
"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.
|
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``.
|
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
|
PMTiles
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
|
|
@ -100,6 +100,14 @@ Source data
|
||||||
|
|
||||||
* TileJSON at ``/data/{id}.json``
|
* 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
|
||||||
===========
|
===========
|
||||||
* Static files are served at ``/files/{filename}``
|
* Static files are served at ``/files/{filename}``
|
||||||
|
|
Loading…
Reference in a new issue