UNPKG

itowns

Version:

A JS/WebGL framework for 3D geospatial data visualization

36 lines (31 loc) 1.17 kB
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _togeojson = _interopRequireDefault(require("@mapbox/togeojson")); var _GeoJsonParser = _interopRequireDefault(require("./GeoJsonParser")); /** * The KMLParser module provides a [parse]{@link module:KMLParser.parse} * method that takes a KML in and gives an object formatted for iTowns * containing all necessary informations to display this KML. * * @module KMLParser */ var _default = { /** * Parse a KML file content and return a [FeatureCollection]{@link * module:GeoJsonParser~FeatureCollection}. * * @param {XMLDocument} kml - The KML file content to parse. * @param {GeoJsonParser~GeoJsonParserOptions} options - Options controlling the parsing. * * @return {Promise} A promise resolving with a [FeatureCollection]{@link * module:GeoJsonParser~FeatureCollection}. */ parse: function parse(kml, options) { return _GeoJsonParser["default"].parse(_togeojson["default"].kml(kml), options); } }; exports["default"] = _default;