Skip to content

Latest commit

 

History

History
26 lines (20 loc) · 423 Bytes

README.md

File metadata and controls

26 lines (20 loc) · 423 Bytes

geojson2png

Convert GeoJSON Feature to PNG Image

Usage

const geojson2Png = require('./geojson2png');

const options = {
  filename: `example.png`,
  style: {
    'stroke': '#444',
    'fill': 'none',
    'stroke-width': '3'
  },
  width: 960,
  height: 500
}

const feature = require('./example.json');

geojson2Png(feature, options, (err, filename) => {
  console.log(`${filename} created.`)
});