geojson-path-finder
geojson-path-finder copied to clipboard
some way to use this library without node compiling ?
Im a bit new to node, and it took me while to work out with your library that though not stated i (think) i had to use browserify to 'compile' the basics of your library to get it to work in the browser ?
Is there any way to use the library without this, eg just
No, since it's built on modules (CommonJS), you have to bundle it to use in a browser.
Having a way to easily create a bundle is a good idea and something at least one person asked about before. I would happily accept a PR for this, but given that I don't actively work at this project, it's not likely I will add it anytime soon.
@hayden-t probably late, but yes, there is:
<script src="https://bundle.run/[email protected]"></script>
<script>
const pathFinder = new geojsonPathFinder(geoJson);
const bestPath = pathFinder.findPath(start, end);
</script>
https://jsfiddle.net/6qugy0rm/