@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.
- package/lib/mapbox-gl.js +21082 -20888
- package/lib/providers/google-maps.js +1 -1
- package/lib/yappkit-map.js +11 -11
- package/package.json +7 -7
|
@@ -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;
|
package/lib/yappkit-map.js
CHANGED
|
@@ -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
|
|
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
|
|
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:
|
|
692
|
-
getWaterRoute:
|
|
691
|
+
getAirRoute: z,
|
|
692
|
+
getWaterRoute: H,
|
|
693
693
|
normalizeRoute: D
|
|
694
|
-
},
|
|
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
|
|
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 =
|
|
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
|
|
716
|
+
const W = (h) => new q(h);
|
|
717
717
|
export {
|
|
718
|
-
|
|
718
|
+
q as default,
|
|
719
719
|
W as loadMapModule,
|
|
720
|
-
|
|
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.
|
|
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.
|
|
37
|
-
"@deck.gl/mapbox": "^8.9.
|
|
38
|
-
"@googlemaps/js-api-loader": "^1.16.
|
|
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.
|
|
41
|
+
"deck.gl": "^8.9.35",
|
|
42
42
|
"geojson-path-finder": "2.0.2",
|
|
43
|
-
"maplibre-gl": "^4.
|
|
44
|
-
"vue": "^3.4.
|
|
43
|
+
"maplibre-gl": "^4.1.0",
|
|
44
|
+
"vue": "^3.4.21"
|
|
45
45
|
}
|
|
46
46
|
}
|