A tile server for generating own OpenStreetMap tiles can be set up easily because node-tileserver has only a few dependencies and is perfectly working together with an osm2pgsql database.
The tile output benefits from the non-blocking I/O design of NodeJS, so that the processing of client requests works quickly and reliably, even at high load and many simultaneous requests.
However, node-tileserver is characterized not only by its slim design and its high speed, but also by the type of rendering: node-tileserver can generate and deliver both vector tiles for rendering in the browser as well as the usual bitmap tiles. To reduce the server load and speed up queries, the tiles are cached after the first rendering on the hard disk, and are updated with a simple but reliable expiring mechanism. The server is also designed to deliver the bitmap tiles in several map styles.
But it is the rendering process itself that is special of node-tileserver: both on the client side and the server side, KothicJS is used for the actual rendering. If a vector map is used, the tile server generates vector tiles in GeoJSON format and delivers them to the client, where they are rendered with KothicJS in the browser. If conventional bitmap tiles are used, the vector data is being rendered on the server - also with KothicJS - and sent as PNG graphics to the client.
This project was founded in December 2013 as a consequence of the unsuccessful search for a slim tile server and renderer during the development of the OpenRailwayMap and is successfully being used since then for rendering tiles of the OpenRailwayMap project.
- Serves tiles bitmap tiles usable in Leaflet or OpenLayers
- Serves vector tiles rendered on clientside by KothicJS
- Uses KothicJS both as bitmap renderer on serverside and canvas renderer on clientside
- Filesystem caching mechanisms
- Map styling with MapCSS
- Support for tiles in multiple rendering styles
- Designed to use with a osm2pgsql hstore database containing OpenStreetMap data
- Refresh tiles manually by GET requests
- Automatic rerendering of expired tiles in the background
- High performance that profits from the non-blocking I/O design of NodeJS
- Easy to install on several operating systems, distributions and environments due to less dependencies