@yappkit/front-module-map 0.1.4 → 0.1.5

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.
@@ -244,7 +244,7 @@ class F {
244
244
  let s = {};
245
245
  if (typeof e == "string" ? s.libraries = [e] : s = { ...e }, await this.loadGoogleMapsSDK(s), typeof e == "string") {
246
246
  if (!this.sdk[e] || !Object.keys(this.sdk[e]).length)
247
- throw new Error(`${e} library is not loaded${e === "maps3d" ? ". Missing version: 'alpha'?" : ""}`);
247
+ throw new Error(`${e} library is not loaded${e === "maps3d" ? ". Missing version: 'alpha' or apiKey not authorized?" : ""}`);
248
248
  return this.sdk[e];
249
249
  }
250
250
  return this.sdk;
@@ -477,7 +477,7 @@ class S {
477
477
  let a = {};
478
478
  if (typeof e == "string" ? a.libraries = [e] : a = { ...e }, await this.loadGoogleMapsSDK(a), typeof e == "string") {
479
479
  if (!this.sdk[e] || !Object.keys(this.sdk[e]).length)
480
- throw new Error(`${e} library is not loaded${e === "maps3d" ? ". Missing version: 'alpha'?" : ""}`);
480
+ throw new Error(`${e} library is not loaded${e === "maps3d" ? ". Missing version: 'alpha' or apiKey not authorized?" : ""}`);
481
481
  return this.sdk[e];
482
482
  }
483
483
  return this.sdk;
@@ -675,7 +675,7 @@ function D(h) {
675
675
  return t - e > 180 ? t += -360 : e - t > 180 ? t += 360 : t += 0, e = t, [t, a[1]];
676
676
  });
677
677
  }
678
- function H({ origin: h, destination: e, step: a = 100 }) {
678
+ function z({ origin: h, destination: e, step: a = 100 }) {
679
679
  const t = K([h, e]), s = P(t), r = [];
680
680
  for (let o = 0; o < s; o += s / a) {
681
681
  const n = j(t, o);
@@ -683,22 +683,22 @@ function H({ origin: h, destination: e, step: a = 100 }) {
683
683
  }
684
684
  return r.push(e), t.geometry.coordinates = D(r), t;
685
685
  }
686
- async function U({ origin: h, destination: e, includeBoundaries: a = !1 }) {
686
+ async function H({ origin: h, destination: e, includeBoundaries: a = !1 }) {
687
687
  const t = (await import("./searoute.js")).default, s = t(G(h), G(e));
688
688
  return a && (s.geometry.coordinates.unshift(h), s.geometry.coordinates.push(e)), s.geometry.coordinates = D(s.geometry.coordinates), s;
689
689
  }
690
690
  const R = {
691
- getAirRoute: H,
692
- getWaterRoute: U,
691
+ getAirRoute: z,
692
+ getWaterRoute: H,
693
693
  normalizeRoute: D
694
- }, q = {
694
+ }, U = {
695
695
  mapbox: A,
696
696
  google: S,
697
697
  "google-maps": S,
698
698
  deckgl: F,
699
699
  "deck-gl": F
700
700
  };
701
- class z {
701
+ class q {
702
702
  constructor(e = {}) {
703
703
  this.options = { ...e };
704
704
  }
@@ -707,16 +707,16 @@ class z {
707
707
  for (const [t, s] of Object.entries(e.config.maps || {})) {
708
708
  if (!s.type)
709
709
  throw new Error("Map type should be defined");
710
- const r = q[s.type];
710
+ const r = U[s.type];
711
711
  r ? a[t] = new r(s) : console.warn(`Map provider: ${s.type} is not supported`);
712
712
  }
713
713
  e.maps = a, e.map = a, this.yAppKit = e;
714
714
  }
715
715
  }
716
- const W = (h) => new z(h);
716
+ const W = (h) => new q(h);
717
717
  export {
718
- z as default,
718
+ q as default,
719
719
  W as loadMapModule,
720
- q as mapProviders,
720
+ U as mapProviders,
721
721
  R as utils
722
722
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yappkit/front-module-map",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "@yappkit/front module for map",
5
5
  "module": "./lib/yappkit-map.js",
6
6
  "main": "./lib/yappkit-map.js",
@@ -33,14 +33,14 @@
33
33
  },
34
34
  "dependencies": {},
35
35
  "peerDependencies": {
36
- "@deck.gl/google-maps": "^8.9.34",
37
- "@deck.gl/mapbox": "^8.9.34",
38
- "@googlemaps/js-api-loader": "^1.16.2",
36
+ "@deck.gl/google-maps": "^8.9.35",
37
+ "@deck.gl/mapbox": "^8.9.35",
38
+ "@googlemaps/js-api-loader": "^1.16.6",
39
39
  "@mapbox/mapbox-sdk": "^0.15.3",
40
40
  "@turf/turf": "^6.5.0",
41
- "deck.gl": "^8.9.34",
41
+ "deck.gl": "^8.9.35",
42
42
  "geojson-path-finder": "2.0.2",
43
- "maplibre-gl": "^4.0.0",
44
- "vue": "^3.4.18"
43
+ "maplibre-gl": "^4.1.0",
44
+ "vue": "^3.4.21"
45
45
  }
46
46
  }