max-mapper / simplify-geojson

apply the ramer-douglas-peucker line simplification to geojson features or feature collections in JS or on the CLI
178 stars 17 forks source link

Add Browser Build #9

Open mikila85 opened 7 years ago

mikila85 commented 7 years ago

is there a way to use this without require? just as a simple js library?

ungoldman commented 7 years ago

Hi @mikila85!

This library was designed as a command line utility with an underlying javascript interface exposed via node.js.

Though it won't work in a browser environment by itself, it should work if bundled using a module bundler like browserify or webpack.

The underlying dependency simplify-geojson has a browser build which is built with browserify -- you can see how that was done here: https://github.com/seabre/simplify-geometry/blob/master/Makefile#L4

A browser build could be made for simplify-geojson using the same technique.