js-kml-parser

1.0.2 • Public • Published

Client side helper to read .kml files content and parse their content as GeoJSON.

Install

npm install js-kml-parser or yarn add js-kml-parser

How to use

import kmlParser from 'js-kml-parser';

const file = document.getElementById("kml-file").files[0];
const reader = new FileReader();
reader.onload = () => {
  const geoJson = kmlParser.toGeoJson(reader.result);
  console.log(geoJson);
}

Package Sidebar

Install

npm i js-kml-parser

Weekly Downloads

137

Version

1.0.2

License

MIT

Unpacked Size

2.62 kB

Total Files

4

Last publish

Collaborators

  • qlerebours