@stadiamaps/ferrostar-webcomponents 0.11.0 → 0.13.0

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.
@@ -1,5 +1,13 @@
1
+ /**
2
+ * Transforms a `GeolocationPosition` (from standard web location APIs)
3
+ * into the standard format expected by the Ferrostar APIs.
4
+ *
5
+ * @param position a position from the Geolocation API
6
+ */
7
+ export declare function ferrostarUserLocation(position: GeolocationPosition): object;
1
8
  export declare class SimulatedLocationProvider {
2
9
  private simulationState;
10
+ private isRunning;
3
11
  lastLocation: null;
4
12
  lastHeading: null;
5
13
  warpFactor: number;
@@ -13,7 +21,26 @@ export declare class BrowserLocationProvider {
13
21
  lastLocation: any;
14
22
  lastHeading: null;
15
23
  updateCallback: () => void;
24
+ /**
25
+ * Starts location updates in the background.
26
+ *
27
+ * Whenever the user's location is updated,
28
+ * the `lastLocation` property will reflect the result
29
+ * Additionally, the `updateCallback` will be invoked,
30
+ * which provides a way for a single subscriber to get updates.
31
+ */
16
32
  start(): void;
33
+ /**
34
+ * Gets the current location of the user asynchronously.
35
+ *
36
+ * @param staleThresholdMilliseconds If a previously retrieved location is available,
37
+ * it will be returned immediately as long as it is no older than the specified
38
+ * number of milliseconds.
39
+ */
40
+ getCurrentLocation(staleThresholdMilliseconds: number): Promise<object>;
41
+ /**
42
+ * Stops location updates.
43
+ */
17
44
  stop(): void;
18
45
  }
19
46
  //# sourceMappingURL=location.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"location.d.ts","sourceRoot":"","sources":["../src/location.ts"],"names":[],"mappings":"AAEA,qBAAa,yBAAyB;IACpC,OAAO,CAAC,eAAe,CAAQ;IAE/B,YAAY,OAAQ;IACpB,WAAW,OAAQ;IACnB,UAAU,SAAK;IAEf,cAAc,EAAE,MAAM,IAAI,CAAY;IAEtC,iBAAiB,CAAC,KAAK,EAAE,GAAG;IAKtB,KAAK;IAqBX,IAAI;CAGL;AAED,qBAAa,uBAAuB;IAClC,OAAO,CAAC,kBAAkB,CAAuB;IACjD,YAAY,EAAE,GAAG,CAAQ;IACzB,WAAW,OAAQ;IAEnB,cAAc,EAAE,MAAM,IAAI,CAAY;IAEtC,KAAK;IAkCL,IAAI;CAOL"}
1
+ {"version":3,"file":"location.d.ts","sourceRoot":"","sources":["../src/location.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,mBAAmB,GAAG,MAAM,CAiB3E;AAED,qBAAa,yBAAyB;IACpC,OAAO,CAAC,eAAe,CAAQ;IAC/B,OAAO,CAAC,SAAS,CAAS;IAE1B,YAAY,OAAQ;IACpB,WAAW,OAAQ;IACnB,UAAU,SAAK;IAEf,cAAc,EAAE,MAAM,IAAI,CAAY;IAEtC,iBAAiB,CAAC,KAAK,EAAE,GAAG;IAKtB,KAAK;IA0BX,IAAI;CAKL;AAED,qBAAa,uBAAuB;IAClC,OAAO,CAAC,kBAAkB,CAAuB;IACjD,YAAY,EAAE,GAAG,CAAQ;IACzB,WAAW,OAAQ;IAEnB,cAAc,EAAE,MAAM,IAAI,CAAY;IAEtC;;;;;;;OAOG;IACH,KAAK;IAsBL;;;;;;OAMG;IACH,kBAAkB,CAAC,0BAA0B,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAqBvE;;OAEG;IACH,IAAI;CAOL"}
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "CatMe0w <CatMe0w@live.cn> (https://github.com/CatMe0w)",
7
7
  "Luke Seelenbinder <luke@stadiamaps.com>"
8
8
  ],
9
- "version": "0.11.0",
9
+ "version": "0.13.0",
10
10
  "license": "BSD-3-Clause",
11
11
  "type": "module",
12
12
  "main": "./dist/ferrostar-webcomponents.js",
@@ -30,7 +30,7 @@
30
30
  "publish:core": "wasm-pack publish --access public ../common/ferrostar/pkg"
31
31
  },
32
32
  "dependencies": {
33
- "@stadiamaps/ferrostar": "^0.11.0",
33
+ "@stadiamaps/ferrostar": "^0.13.0",
34
34
  "lit": "^3.1.4",
35
35
  "maplibre-gl": "^4.5.0",
36
36
  "vite-plugin-dts": "^4.0.3"