You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
handle local geojson files in styles and rendered tiles
- use 'file://' as indicator for local files
- add directory as default directory
- serve local files at
- add documentation for static file serving
- add some minor fixes (icon directory, directory checking, decodeURL, extend error message)
Copy file name to clipboardExpand all lines: docs/endpoints.rst
+12Lines changed: 12 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -100,6 +100,18 @@ Source data
100
100
101
101
* TileJSON at ``/data/{id}.json``
102
102
103
+
Static files
104
+
===========
105
+
* Static files are served at ``/files/{filename}``
106
+
107
+
* The source folder can be configured (``options.paths.files``), default is ``public/files``
108
+
109
+
* This feature can be used to serve ``geojson`` files for styles and rendered tiles.
110
+
111
+
* Keep in mind, that each rendered tile loads the whole geojson file, if performance matters a conversion to a tiled format (e.g. with https://github.com/felt/tippecanoe)may be a better approch.
112
+
113
+
* Use ``file://{filename}`` to have matching paths for both endoints
114
+
103
115
TileJSON arrays
104
116
===============
105
117
Array of all TileJSONs is at ``[/{tileSize}]/index.json`` (``[/{tileSize}]/rendered.json``; ``/data.json``)
0 commit comments