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 GpxParser module provides a [parse]{@link module:GpxParser.parse} * method that takes a GPX in and gives an object formatted for iTowns * containing all necessary informations to display this GPX. * * @module GpxParser */ var _default = { /** * Parse a GPX file content and return a [FeatureCollection]{@link * module:GeoJsonParser~FeatureCollection}. * * @param {XMLDocument} gpx - The GPX 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(gpx, options) { return _GeoJsonParser["default"].parse(_togeojson["default"].gpx(gpx), options); } }; exports["default"] = _default;