webwurst / geojson-vectortiles-example

Rendering GeoJSON with node-mapnik

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Vector tiles with tilelive-bridge and Leaflet

This repository contains code demonstrating the rendering of a GeoJSON file using tilelive-bridge with Mapnik. The output is in vector tile (.pbf, protobuf) format. The server directory contains the server application app.js, an intermediate Mapnik compatible stylesheet map.xml and the data file random-points.geojson containing 5000 randomly distributed points in Germany.

The viewer folder contains a small example on how to use the output generated by the server with Leaflet and Leaflet.MapboxVectorTile.

To use it, do the following:

cd server
npm install
node app.js

The server will accept requests on localhost:9999. Start the viewer/index.html to see the results.

Check out the demo here.

About

Rendering GeoJSON with node-mapnik

License:MIT License


Languages

Language:JavaScript 55.0%Language:HTML 37.0%Language:CSS 8.0%