Setup a Map Server using Fabrix, Mapnik, and Tilelive. Supports tile caching with S3.
- Node 6 or higher
- Mapnik 3.0.9 or higher (tested on 3.0.9)
- OSX or Linux (binaries pre-built for
linux
anddarwin
platforms)
$ npm install --save spool-mapnik
// config/main.ts
import { MapnikSpool } from '@fabrix/spool-mapnik'
export const main = {
spools: [
// ... other spools
MapnikSpool
]
}
// config/mapnik.ts
const path = require('path')
export const mapnik = {
/**
* Define paths to mapnik map configs
*/
maps: {
basemap: {
pathname: path.resolve(__dirname, 'basemap.xml')
},
someOverlay: {
pathname: path.resolve(__dirname, 'vector_overlay.xml')
}
},
/**
* Additional Tilelive protocols (e.g. vector)
*/
protocols: [
require('tilelive-additionalplugin')
]
}
MIT