@loaders.gl/tile-converter 4.2.1 → 4.3.0-alpha.2
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.
- package/dist/converter.min.cjs +79 -79
- package/dist/deps-installer/deps-installer.js +1 -1
- package/dist/i3s-server/app.js +7 -1
- package/dist/i3s-server/bin/i3s-server.min.cjs +80 -80
- package/dist/i3s-server/controllers/index-controller.d.ts +2 -1
- package/dist/i3s-server/controllers/index-controller.d.ts.map +1 -1
- package/dist/i3s-server/controllers/index-controller.js +11 -4
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +2 -2
- package/dist/pgm-loader.js +1 -1
- package/dist/slpk-extractor.min.cjs +1 -1
- package/package.json +16 -16
- package/src/i3s-server/app.ts +7 -1
- package/src/i3s-server/controllers/index-controller.ts +11 -5
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Get local file name by input HTTP URL
|
|
3
3
|
* @param url - I3S HTTP service url
|
|
4
|
+
* @param i3sLayerPath - I3S layer path
|
|
4
5
|
* @returns - local file name
|
|
5
6
|
*/
|
|
6
|
-
export declare function getFileNameByUrl(url: string): Promise<string | null>;
|
|
7
|
+
export declare function getFileNameByUrl(url: string, i3sLayerPath?: string): Promise<string | null>;
|
|
7
8
|
//# sourceMappingURL=index-controller.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-controller.d.ts","sourceRoot":"","sources":["../../../src/i3s-server/controllers/index-controller.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index-controller.d.ts","sourceRoot":"","sources":["../../../src/i3s-server/controllers/index-controller.ts"],"names":[],"mappings":"AAKA;;;;;GAKG;AACH,wBAAsB,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,YAAY,SAAK,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAoB7F"}
|
|
@@ -1,17 +1,24 @@
|
|
|
1
1
|
import path from 'path';
|
|
2
2
|
import fs from 'fs';
|
|
3
3
|
const { promises } = fs;
|
|
4
|
-
const I3S_LAYER_PATH = process.env.I3sLayerPath || '';
|
|
5
4
|
/**
|
|
6
5
|
* Get local file name by input HTTP URL
|
|
7
6
|
* @param url - I3S HTTP service url
|
|
7
|
+
* @param i3sLayerPath - I3S layer path
|
|
8
8
|
* @returns - local file name
|
|
9
9
|
*/
|
|
10
|
-
export async function getFileNameByUrl(url) {
|
|
10
|
+
export async function getFileNameByUrl(url, i3sLayerPath = '') {
|
|
11
|
+
i3sLayerPath = i3sLayerPath || process.env.I3sLayerPath || '';
|
|
11
12
|
const extensions = ['json', 'bin', 'jpg', 'jpeg', 'png', 'bin.dds', 'ktx2'];
|
|
12
|
-
|
|
13
|
+
let filePath = process.cwd();
|
|
14
|
+
// Checks if the first character is not a point to indicate absolute path
|
|
15
|
+
const absolutePath = /^[^.]/.exec(i3sLayerPath);
|
|
16
|
+
if (absolutePath) {
|
|
17
|
+
filePath = '';
|
|
18
|
+
}
|
|
19
|
+
const FULL_LAYER_PATH = path.join(filePath, i3sLayerPath, url);
|
|
13
20
|
for (const ext of extensions) {
|
|
14
|
-
const fileName = `${FULL_LAYER_PATH}
|
|
21
|
+
const fileName = `${FULL_LAYER_PATH}/index.${ext}`;
|
|
15
22
|
try {
|
|
16
23
|
await promises.access(fileName);
|
|
17
24
|
return fileName;
|
package/dist/index.cjs
CHANGED
|
@@ -2342,7 +2342,7 @@ function convertScreenThresholdToGeometricError(node) {
|
|
|
2342
2342
|
|
|
2343
2343
|
// dist/pgm-loader.js
|
|
2344
2344
|
var import_geoid = require("@math.gl/geoid");
|
|
2345
|
-
var VERSION = true ? "4.
|
|
2345
|
+
var VERSION = true ? "4.3.0-alpha.1" : "latest";
|
|
2346
2346
|
var PGMLoader = {
|
|
2347
2347
|
dataType: null,
|
|
2348
2348
|
batchType: null,
|