Closed abenrob closed 8 years ago
tileserver-gl can not serve postgres directly. You should convert your datasets to vector tiles using tippecanoe or tilelive-bridge
You can also use https://github.com/terranodo/tegola to serve the vector tiles from PostGIS. You can then use the tiles in the JSON style (and possibly add other sources) to have both vector and raster tiles.
The complete answer is:
Yes, you can use in the TileServer GL non-mbtiles source. It is done via including http:// link to vector tiles source
provided by an external service.
You may have vector tiles simply stored in Amazon S3 / Google Cloud Storage / unpacked directory on static hosting - like http://klokantech.github.io/mapbox-gl-js-offline-example/ or https://github.com/klokantech/vector-tiles-sample#host-the-vector-tiles-without-any-server-at-all
There are also other servers such as GeoServer or MapServer or Tegola - which are able to create on demand .pbf vector tiles in MVT (MapBox Vector Tiles) format from your Postgres database.
TileServer GL can then use such vector tile server and render these into raster tiles with defined JSON styles.
Thanks @klokan ! That is exactly what I was looking for!
Is it possible to use a non-mbtiles source for this server? I have global OSM data in a postgres database already, so referencing an mbtiles copy seems redundant storage-wise.