@openglobus/og 0.26.0 → 0.26.1

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.
@@ -4,6 +4,7 @@ import { EmptyTerrain } from "./EmptyTerrain";
4
4
  import type { IEmptyTerrainParams, UrlRewriteFunc } from "./EmptyTerrain";
5
5
  import { Extent } from "../Extent";
6
6
  import { Loader } from "../utils/Loader";
7
+ import type { FetchCache } from "../utils/Loader";
7
8
  import { LonLat } from "../LonLat";
8
9
  import { Segment } from "../segment/Segment";
9
10
  export interface IGlobusTerrainParams extends IEmptyTerrainParams {
@@ -19,7 +20,7 @@ export interface IGlobusTerrainParams extends IEmptyTerrainParams {
19
20
  * https://developer.mozilla.org/en-US/docs/Web/API/Request/cache
20
21
  * @default "default"
21
22
  */
22
- cache?: string;
23
+ cache?: FetchCache;
23
24
  }
24
25
  type TileData = {
25
26
  heights: number[] | TypedArray | null;
@@ -70,7 +71,7 @@ declare class GlobusTerrain extends EmptyTerrain {
70
71
  */
71
72
  protected _urlRewriteCallback: UrlRewriteFunc | null;
72
73
  protected _heightFactor: number;
73
- protected _cache: string;
74
+ protected _cache: FetchCache;
74
75
  constructor(name?: string, options?: IGlobusTerrainParams);
75
76
  get loader(): Loader<GlobusTerrain>;
76
77
  clearCache(): void;
@@ -8,6 +8,7 @@ export interface IResponse {
8
8
  msg?: string;
9
9
  }
10
10
  type IResponseCallback = (response: IResponse) => void;
11
+ export type FetchCache = 'default' | 'no-store' | 'no-cache' | 'reload' | 'force-cache' | 'only-if-cached';
11
12
  interface Obj<T> {
12
13
  __id: number;
13
14
  isIdle: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openglobus/og",
3
- "version": "0.26.0",
3
+ "version": "0.26.1",
4
4
  "description": "[openglobus](https://www.openglobus.org/) is a javascript/typescript library designed to display interactive 3d maps and planets with map tiles, imagery and vector data, markers, and 3D objects. It uses the WebGL technology, open source, and completely free.",
5
5
  "main": "lib/og.es.js",
6
6
  "types": "lib/index.d.ts",