docs: update docs
Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>
This commit is contained in:
parent
a106fec3fc
commit
ccad4854a0
2 changed files with 45 additions and 5 deletions
|
|
@ -180,11 +180,27 @@ Each item in this object defines one style (map). It can have the following opti
|
||||||
``data``
|
``data``
|
||||||
========
|
========
|
||||||
|
|
||||||
Each item specifies one data source which should be made accessible by the server. It has the following options:
|
Each item specifies one data source which should be made accessible by the server. It has to have one of the following options:
|
||||||
|
|
||||||
* ``mbtiles`` -- name of the mbtiles file [required]
|
* ``mbtiles`` -- name of the mbtiles file
|
||||||
|
* ``pmtiles`` -- name of the pmtiles file or url to the file.
|
||||||
|
|
||||||
The mbtiles file does not need to be specified here unless you explicitly want to serve the raw data.
|
For example::
|
||||||
|
|
||||||
|
"data": {
|
||||||
|
"source1": {
|
||||||
|
"mbtiles": "source1.mbtiles"
|
||||||
|
},
|
||||||
|
"source2": {
|
||||||
|
"pmtiles": "source2.pmtiles"
|
||||||
|
},
|
||||||
|
"source3": {
|
||||||
|
"pmtiles": "https://foo.lan/source3.pmtiles"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
The data source file does not need to be specified here unless you explicitly want to serve the raw data.
|
||||||
|
|
||||||
Referencing local files from style JSON
|
Referencing local files from style JSON
|
||||||
=======================================
|
=======================================
|
||||||
|
|
@ -207,9 +223,33 @@ For example::
|
||||||
}
|
}
|
||||||
|
|
||||||
Alternatively, you can use ``mbtiles://{zurich-vector}`` to reference existing data object from the config.
|
Alternatively, you can use ``mbtiles://{zurich-vector}`` to reference existing data object from the config.
|
||||||
In this case, the server will look into the ``config.json`` to determine what mbtiles file to use.
|
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://zurich.mbtiles``.
|
For the config above, this is equivalent to ``mbtiles://zurich.mbtiles``.
|
||||||
|
|
||||||
|
PMTiles
|
||||||
|
-------
|
||||||
|
|
||||||
|
To specify that you want to use local pmtiles, use to following syntax: ``pmtiles://switzerland.pmtiles``.
|
||||||
|
To specify that you want to use a http based pmtiles, use to following syntax: ``pmtiles://https://foo.lan/switzerland.pmtiles``.
|
||||||
|
The TileServer-GL will try to find the file ``switzerland.pmtiles`` in ``root`` + ``pmtiles`` path.
|
||||||
|
|
||||||
|
For example::
|
||||||
|
|
||||||
|
"sources": {
|
||||||
|
"source1": {
|
||||||
|
"url": "pmtiles://switzerland.pmtiles",
|
||||||
|
"type": "vector"
|
||||||
|
},
|
||||||
|
"source2": {
|
||||||
|
"url": "pmtiles://https://foo.lan/switzerland.pmtiles",
|
||||||
|
"type": "vector"
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
Alternatively, you can use ``pmtiles://{zurich-vector}`` to reference existing data object from the config.
|
||||||
|
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 ``pmtiles://zurich.mbtiles``.
|
||||||
|
|
||||||
Sprites
|
Sprites
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,8 @@ import path from 'path';
|
||||||
import url from 'url';
|
import url from 'url';
|
||||||
import util from 'util';
|
import util from 'util';
|
||||||
import zlib from 'zlib';
|
import zlib from 'zlib';
|
||||||
import sharp from 'sharp'; // sharp has to be required before node-canvas on linux but after it on windows. see https://github.com/lovell/sharp/issues/371
|
|
||||||
import { createCanvas, Image } from 'canvas';
|
import { createCanvas, Image } from 'canvas';
|
||||||
|
import sharp from 'sharp'; // sharp has to be required before node-canvas on linux but after it on windows. see https://github.com/lovell/sharp/issues/371
|
||||||
import clone from 'clone';
|
import clone from 'clone';
|
||||||
import Color from 'color';
|
import Color from 'color';
|
||||||
import express from 'express';
|
import express from 'express';
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue