Created
November 4, 2019 15:13
-
-
Save rocaiguina/bcb91f5aacc269d9a3062a27b08a29a5 to your computer and use it in GitHub Desktop.
to vector tiles
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fs = require('fs'); | |
var geojson2mvt = require('geojson2mvt'); | |
const filePath = 'grids.json'; | |
var options = { | |
rootDir: 'grids', | |
bbox : [17.896877,-67.298786,18.602453,-65.199024],//[south,west,north,east]-67.298786,17.896877,-65.199024,18.602453 | |
zoom : { | |
min : 6, | |
max : 14, | |
}, | |
layerName: 'grids', | |
}; | |
var geoJson = JSON.parse(fs.readFileSync(filePath, "utf8")); | |
// build the static tile pyramid | |
geojson2mvt(geoJson, options); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment