Introduction
This lib is modified from @mapbox/togeojson, enhanced with folder parse capability
Install
npm i --save kml-parse
Usage
const kmlParse = const fs = const DOMParser = DOMParserconst kmlDom = /** * returns folder tree and feature collection * return { folder: [], geoJSON: [] } */kmlParse /** * returns feature collection * This function is ported from @mapbox/togeojson, `tj.kml(kmlDom)` * * feature.properties.folder = <folderKey> */kmlParse /** * returns folder tree * folder: [{ key: <folderKey>, parent: <parentFolderKey>, name: <folderName>, children: [] }] */kmlParse