Elasticmaps
A Node.js map tile server based on node-mapnik and elasticsearch
Installation
npm install elasticmaps --save
Usage
// This is the most basic example. It assumes elasticsearch// is running on localhost:9200, and that there is an index// named elasticmaps_development which has documents with minimally// an integer `id` and geo_point `location` field var Elasticmaps = port = Number processenvPORT || 4000 ; var app = Elasticmaps;// create the tile routeapp; app;
// In this example a custom config object is supplied// when creating the server. Functions can be provided// to create custom queries and styles based on the request var Elasticmaps = port = Number processenvPORT || 4000 ; var config = environment: "production" debug: true tileSize: 256 elasticsearch: host: "localhost:9200" searchIndex: "points_index" geoPointField: "location" { reqelastic_query = ...; ; } { reqstyle = ...; ; }; var server = Elasticmaps;server;