aviation-chart 2.0.26 → 2.0.28

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/nav-sdk.d.ts CHANGED
@@ -49,7 +49,7 @@ declare class GlobalConfigManager {
49
49
  reset(): void;
50
50
  setPeriod(period: string): void;
51
51
  getPeriod(): string | undefined;
52
- generateCurrentPeriod(): Promise<string>;
52
+ generateCurrentPeriod(apiUrl?: string): Promise<string>;
53
53
  setMapReinitCallback(callback: (() => void | Promise<void>) | null): void;
54
54
  destroy(): void;
55
55
  }
@@ -3458,8 +3458,8 @@ class GlobalConfigManager {
3458
3458
  getPeriod() {
3459
3459
  return this.config.period;
3460
3460
  }
3461
- async generateCurrentPeriod() {
3462
- const base = (this.config.apiUrl || "https://aips.siniswift.com").replace(/\/$/, "");
3461
+ async generateCurrentPeriod(apiUrl) {
3462
+ const base = (apiUrl || this.config.apiUrl || "https://aips.siniswift.com").replace(/\/$/, "");
3463
3463
  const headers = this.config.apiKey
3464
3464
  ? { "X-Api-Key": this.config.apiKey }
3465
3465
  : {};
@@ -7442,15 +7442,15 @@ function getAviationBaseStyle(opts) {
7442
7442
  const spriteBase = (opts.spriteUrl ?? apiUrl).replace(/\/$/, "");
7443
7443
  return {
7444
7444
  version: 8,
7445
- glyphs: "https://aips.siniswift.com/mapsdk/glyphs/{fontstack}/{range}.pbf",
7445
+ glyphs: `${spriteBase}/kyresources/{fontstack}/{range}.pbf`,
7446
7446
  sprite: [
7447
- { id: "plane", url: `${spriteBase}/sprites/sprite-plane` },
7448
- { id: "normal", url: `${spriteBase}/sprites/sprite-color` },
7449
- { id: "default", url: `${spriteBase}/sprites/sprite` },
7450
- { id: "v2", url: `${spriteBase}/sprites/sprite-v2` },
7451
- { id: "vor", url: `${spriteBase}/sprites/sprite-vor` },
7452
- { id: "runway", url: `${spriteBase}/sprites/sprite-runway` },
7453
- { id: "stretch", url: `${spriteBase}/sprites/sprite-stretch` },
7447
+ { id: "plane", url: `${spriteBase}/kyresources/sprite-plane` },
7448
+ { id: "normal", url: `${spriteBase}/kyresources/sprite-color` },
7449
+ { id: "default", url: `${spriteBase}/kyresources/sprite` },
7450
+ { id: "v2", url: `${spriteBase}/kyresources/sprite-v2` },
7451
+ { id: "vor", url: `${spriteBase}/kyresources/sprite-vor` },
7452
+ { id: "runway", url: `${spriteBase}/kyresources/sprite-runway` },
7453
+ { id: "stretch", url: `${spriteBase}/kyresources/sprite-stretch` },
7454
7454
  ],
7455
7455
  sources: {
7456
7456
  land: { type: "geojson", data: LAND_FC },
@@ -10524,7 +10524,7 @@ class MapSDK {
10524
10524
  this.setPeriod(options.period);
10525
10525
  }
10526
10526
  else {
10527
- const calculatedPeriod = await this.globalConfig.generateCurrentPeriod();
10527
+ const calculatedPeriod = await this.globalConfig.generateCurrentPeriod(this._chartApiUrl);
10528
10528
  this.setPeriod(calculatedPeriod);
10529
10529
  }
10530
10530
  this.initializeManagers();
@@ -10963,7 +10963,7 @@ class MapSDK {
10963
10963
  return this.globalConfig.getPeriod();
10964
10964
  }
10965
10965
  async generateCurrentPeriod() {
10966
- return await this.globalConfig.generateCurrentPeriod();
10966
+ return await this.globalConfig.generateCurrentPeriod(this._chartApiUrl);
10967
10967
  }
10968
10968
  async search(params) {
10969
10969
  const auth = await this._apiAuth();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aviation-chart",
3
- "version": "2.0.26",
3
+ "version": "2.0.28",
4
4
  "description": "KunYu aviation map SDK",
5
5
  "main": "dist/nav-sdk.esm.js",
6
6
  "module": "dist/nav-sdk.esm.js",