@loaders.gl/kml 3.4.11 → 3.4.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,7 +9,7 @@ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"))
9
9
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
10
10
  var _gis = require("@loaders.gl/gis");
11
11
  var _togeojson = require("@tmcw/togeojson");
12
- var VERSION = typeof "3.4.11" !== 'undefined' ? "3.4.11" : 'latest';
12
+ var VERSION = typeof "3.4.13" !== 'undefined' ? "3.4.13" : 'latest';
13
13
  var GPX_HEADER = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<gpx";
14
14
  var GPXLoader = {
15
15
  name: 'GPX (GPS exchange format)',
@@ -9,7 +9,7 @@ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"))
9
9
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
10
10
  var _gis = require("@loaders.gl/gis");
11
11
  var _togeojson = require("@tmcw/togeojson");
12
- var VERSION = typeof "3.4.11" !== 'undefined' ? "3.4.11" : 'latest';
12
+ var VERSION = typeof "3.4.13" !== 'undefined' ? "3.4.13" : 'latest';
13
13
  var KML_HEADER = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<kml xmlns=\"http://www.opengis.net/kml/2.2\">";
14
14
  var KMLLoader = {
15
15
  name: 'KML (Keyhole Markup Language)',
@@ -9,7 +9,7 @@ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"))
9
9
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
10
10
  var _gis = require("@loaders.gl/gis");
11
11
  var _togeojson = require("@tmcw/togeojson");
12
- var VERSION = typeof "3.4.11" !== 'undefined' ? "3.4.11" : 'latest';
12
+ var VERSION = typeof "3.4.13" !== 'undefined' ? "3.4.13" : 'latest';
13
13
  var TCX_HEADER = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<TrainingCenterDatabase";
14
14
  var TCXLoader = {
15
15
  name: 'TCX (Training Center XML)',
@@ -1,6 +1,6 @@
1
1
  import { geojsonToBinary } from '@loaders.gl/gis';
2
2
  import { gpx } from '@tmcw/togeojson';
3
- const VERSION = typeof "3.4.11" !== 'undefined' ? "3.4.11" : 'latest';
3
+ const VERSION = typeof "3.4.13" !== 'undefined' ? "3.4.13" : 'latest';
4
4
  const GPX_HEADER = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<gpx";
5
5
  export const GPXLoader = {
6
6
  name: 'GPX (GPS exchange format)',
@@ -1,6 +1,6 @@
1
1
  import { geojsonToBinary } from '@loaders.gl/gis';
2
2
  import { kml } from '@tmcw/togeojson';
3
- const VERSION = typeof "3.4.11" !== 'undefined' ? "3.4.11" : 'latest';
3
+ const VERSION = typeof "3.4.13" !== 'undefined' ? "3.4.13" : 'latest';
4
4
  const KML_HEADER = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<kml xmlns=\"http://www.opengis.net/kml/2.2\">";
5
5
  export const KMLLoader = {
6
6
  name: 'KML (Keyhole Markup Language)',
@@ -1,6 +1,6 @@
1
1
  import { geojsonToBinary } from '@loaders.gl/gis';
2
2
  import { tcx } from '@tmcw/togeojson';
3
- const VERSION = typeof "3.4.11" !== 'undefined' ? "3.4.11" : 'latest';
3
+ const VERSION = typeof "3.4.13" !== 'undefined' ? "3.4.13" : 'latest';
4
4
  const TCX_HEADER = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<TrainingCenterDatabase";
5
5
  export const TCXLoader = {
6
6
  name: 'TCX (Training Center XML)',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loaders.gl/kml",
3
- "version": "3.4.11",
3
+ "version": "3.4.13",
4
4
  "description": "Framework-independent loader for the KML format",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -32,10 +32,10 @@
32
32
  "build-bundle": "esbuild src/bundle.ts --bundle --outfile=dist/dist.min.js"
33
33
  },
34
34
  "dependencies": {
35
- "@loaders.gl/gis": "3.4.11",
36
- "@loaders.gl/loader-utils": "3.4.11",
37
- "@loaders.gl/schema": "3.4.11",
35
+ "@loaders.gl/gis": "3.4.13",
36
+ "@loaders.gl/loader-utils": "3.4.13",
37
+ "@loaders.gl/schema": "3.4.13",
38
38
  "@tmcw/togeojson": "^4.5.0"
39
39
  },
40
- "gitHead": "2b8d490d2372e70dd89eef8f6b215a5205c16621"
40
+ "gitHead": "be8849c02972ce541e01720d29b976f830d6af92"
41
41
  }
package/dist/bundle.js DELETED
@@ -1,5 +0,0 @@
1
- "use strict";
2
- // @ts-nocheck
3
- const moduleExports = require('./index');
4
- globalThis.loaders = globalThis.loaders || {};
5
- module.exports = Object.assign(globalThis.loaders, moduleExports);
@@ -1,61 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports._typecheckGPXLoader = exports.GPXLoader = void 0;
4
- const gis_1 = require("@loaders.gl/gis");
5
- const togeojson_1 = require("@tmcw/togeojson");
6
- // __VERSION__ is injected by babel-plugin-version-inline
7
- // @ts-ignore TS2304: Cannot find name '__VERSION__'.
8
- const VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';
9
- const GPX_HEADER = `\
10
- <?xml version="1.0" encoding="UTF-8"?>
11
- <gpx`;
12
- /**
13
- * Loader for GPX (GPS exchange format)
14
- */
15
- exports.GPXLoader = {
16
- name: 'GPX (GPS exchange format)',
17
- id: 'gpx',
18
- module: 'kml',
19
- version: VERSION,
20
- extensions: ['gpx'],
21
- mimeTypes: ['application/gpx+xml'],
22
- text: true,
23
- tests: [GPX_HEADER],
24
- parse: async (arrayBuffer, options) => parseTextSync(new TextDecoder().decode(arrayBuffer), options),
25
- parseTextSync,
26
- options: {
27
- gpx: {},
28
- gis: {}
29
- }
30
- };
31
- function parseTextSync(text, options) {
32
- const doc = new DOMParser().parseFromString(text, 'text/xml');
33
- const geojson = (0, togeojson_1.gpx)(doc);
34
- const shape = options?.gis?.format || options?.gpx?.type || options?.gpx?.shape;
35
- switch (shape) {
36
- case 'object-row-table': {
37
- const table = {
38
- shape: 'object-row-table',
39
- data: geojson.features
40
- };
41
- return table;
42
- }
43
- case 'geojson-row-table': {
44
- const table = {
45
- shape: 'geojson-row-table',
46
- data: geojson.features
47
- };
48
- return table;
49
- }
50
- case 'geojson':
51
- return geojson;
52
- case 'binary':
53
- return (0, gis_1.geojsonToBinary)(geojson.features);
54
- case 'raw':
55
- return doc;
56
- default:
57
- // Default to geojson for backwards compatibility
58
- return geojson;
59
- }
60
- }
61
- exports._typecheckGPXLoader = exports.GPXLoader;
package/dist/index.js DELETED
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TCXLoader = exports.KMLLoader = exports.GPXLoader = void 0;
4
- var gpx_loader_1 = require("./gpx-loader");
5
- Object.defineProperty(exports, "GPXLoader", { enumerable: true, get: function () { return gpx_loader_1.GPXLoader; } });
6
- var kml_loader_1 = require("./kml-loader");
7
- Object.defineProperty(exports, "KMLLoader", { enumerable: true, get: function () { return kml_loader_1.KMLLoader; } });
8
- var tcx_loader_1 = require("./tcx-loader");
9
- Object.defineProperty(exports, "TCXLoader", { enumerable: true, get: function () { return tcx_loader_1.TCXLoader; } });
@@ -1,62 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports._typecheckKMLLoader = exports.KMLLoader = void 0;
4
- const gis_1 = require("@loaders.gl/gis");
5
- const togeojson_1 = require("@tmcw/togeojson");
6
- // __VERSION__ is injected by babel-plugin-version-inline
7
- // @ts-ignore TS2304: Cannot find name '__VERSION__'.
8
- const VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';
9
- const KML_HEADER = `\
10
- <?xml version="1.0" encoding="UTF-8"?>
11
- <kml xmlns="http://www.opengis.net/kml/2.2">`;
12
- /**
13
- * Loader for KML (Keyhole Markup Language)
14
- */
15
- exports.KMLLoader = {
16
- name: 'KML (Keyhole Markup Language)',
17
- id: 'kml',
18
- module: 'kml',
19
- version: VERSION,
20
- extensions: ['kml'],
21
- mimeTypes: ['application/vnd.google-earth.kml+xml'],
22
- text: true,
23
- tests: [KML_HEADER],
24
- parse: async (arrayBuffer, options) => parseTextSync(new TextDecoder().decode(arrayBuffer), options),
25
- parseTextSync,
26
- options: {
27
- kml: {},
28
- gis: {}
29
- }
30
- };
31
- function parseTextSync(text, options) {
32
- const doc = new DOMParser().parseFromString(text, 'text/xml');
33
- const geojson = (0, togeojson_1.kml)(doc);
34
- // backwards compatibility
35
- const shape = options?.gis?.format || options?.kml?.type || options?.kml?.shape;
36
- switch (shape) {
37
- case 'object-row-table': {
38
- const table = {
39
- shape: 'object-row-table',
40
- data: geojson.features
41
- };
42
- return table;
43
- }
44
- case 'geojson-row-table': {
45
- const table = {
46
- shape: 'geojson-row-table',
47
- data: geojson.features
48
- };
49
- return table;
50
- }
51
- case 'geojson':
52
- return geojson;
53
- case 'binary':
54
- return (0, gis_1.geojsonToBinary)(geojson.features);
55
- case 'raw':
56
- return doc;
57
- default:
58
- // Default to geojson for backwards compatibility
59
- return geojson;
60
- }
61
- }
62
- exports._typecheckKMLLoader = exports.KMLLoader;
@@ -1,62 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports._typecheckTCXLoader = exports.TCXLoader = void 0;
4
- const gis_1 = require("@loaders.gl/gis");
5
- const togeojson_1 = require("@tmcw/togeojson");
6
- // __VERSION__ is injected by babel-plugin-version-inline
7
- // @ts-ignore TS2304: Cannot find name '__VERSION__'.
8
- const VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';
9
- const TCX_HEADER = `\
10
- <?xml version="1.0" encoding="UTF-8"?>
11
- <TrainingCenterDatabase`;
12
- /**
13
- * Loader for TCX (Training Center XML) - Garmin GPS track format
14
- */
15
- exports.TCXLoader = {
16
- name: 'TCX (Training Center XML)',
17
- id: 'tcx',
18
- module: 'kml',
19
- version: VERSION,
20
- extensions: ['tcx'],
21
- mimeTypes: ['application/vnd.garmin.tcx+xml'],
22
- text: true,
23
- tests: [TCX_HEADER],
24
- parse: async (arrayBuffer, options) => parseTextSync(new TextDecoder().decode(arrayBuffer), options),
25
- parseTextSync,
26
- options: {
27
- tcx: {},
28
- gis: {}
29
- }
30
- };
31
- function parseTextSync(text, options) {
32
- const doc = new DOMParser().parseFromString(text, 'text/xml');
33
- const geojson = (0, togeojson_1.tcx)(doc);
34
- // backwards compatibility
35
- const shape = options?.gis?.format || options?.tcx?.type || options?.tcx?.shape;
36
- switch (shape) {
37
- case 'object-row-table': {
38
- const table = {
39
- shape: 'object-row-table',
40
- data: geojson.features
41
- };
42
- return table;
43
- }
44
- case 'geojson-row-table': {
45
- const table = {
46
- shape: 'geojson-row-table',
47
- data: geojson.features
48
- };
49
- return table;
50
- }
51
- case 'geojson':
52
- return geojson;
53
- case 'binary':
54
- return (0, gis_1.geojsonToBinary)(geojson.features);
55
- case 'raw':
56
- return doc;
57
- default:
58
- // Default to geojson for backwards compatibility
59
- return geojson;
60
- }
61
- }
62
- exports._typecheckTCXLoader = exports.TCXLoader;