make-tile — Convert geojson to tile
A highly efficient JavaScript library for making vector tile from GeoJSON data on the fly.
Resulting tiles conform to the JSON equivalent of the vector tile specification. To make data rendering and interaction fast, the tiles are simplified, retaining the minimum level of detail appropriate for each zoom level (simplifying shapes, filtering out tiny polygons and polylines).
Usage
// build an tileconst tile = ;
Options
You can fine-tune the results with an options object, although the defaults are sensible and work well for most use cases.
const tle = ;
The promoteId
and generateId
options ignore existing id
values on the feature objects.
Install
Install using NPM (npm install make-tile
) or Yarn (yarn add make-tile
), then:
// import as a ES module; // or require in Node / Browserifyconst makeTile = ;