osm2geojson-lite
Version:
a lightweight yet faster osm (either in xml or in json formats) to geojson convertor - 4x faster than xmldom + osmtogeojson in most situations - implemented in pure JavaScript without any 3rd party dependency
33 lines (32 loc) • 849 B
TypeScript
export default class {
private queryParent;
private progressive;
private parentMap;
private evtListeners;
constructor(opts: any);
parse(xml: string, parent?: any, dir?: string): any[];
getParent(node: any): any;
addListener(evt: string, func: (node: {
[k: string]: any;
}, parent?: {
[k: string]: any;
}) => void): void;
removeListener(evt: string, func: (node: {
[k: string]: any;
}, parent?: {
[k: string]: any;
}) => void): void;
on(evt: string, func: (node: {
[k: string]: any;
}, parent?: {
[k: string]: any;
}) => void): void;
off(evt: string, func: (node: {
[k: string]: any;
}, parent?: {
[k: string]: any;
}) => void): void;
private $addListener;
private $removeListener;
private emit;
}