@wemap/core 14.1.0 → 14.2.0-beta.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.
- package/dist/index.js +172 -782
- package/dist/src/helpers/SnippetParser.d.ts +1 -1
- package/dist/src/helpers/SnippetParser.d.ts.map +1 -1
- package/dist/src/types/common.d.ts +1 -1
- package/dist/src/types/common.d.ts.map +1 -1
- package/dist/src/utils/map.d.ts +1 -1
- package/dist/src/utils/map.d.ts.map +1 -1
- package/dist/vitest.config.d.ts.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,846 +1,236 @@
|
|
|
1
|
+
import { BoundingBox, Coordinates } from "@wemap/geo";
|
|
1
2
|
var HttpError = class extends Error {
|
|
2
3
|
status;
|
|
3
4
|
statusText;
|
|
4
5
|
data;
|
|
5
|
-
constructor(
|
|
6
|
-
super(
|
|
6
|
+
constructor(e, h, g, _) {
|
|
7
|
+
super(_ || `HTTP Error ${e}: ${h}`), this.name = "HttpError", this.status = e, this.statusText = h, this.data = g;
|
|
7
8
|
}
|
|
8
9
|
}, HttpClient = class {
|
|
9
10
|
config;
|
|
10
|
-
constructor(
|
|
11
|
+
constructor(e) {
|
|
11
12
|
this.config = {
|
|
12
13
|
defaultHeaders: { "Content-Type": "application/json" },
|
|
13
|
-
...
|
|
14
|
+
...e
|
|
14
15
|
};
|
|
15
16
|
}
|
|
16
|
-
setBaseUrl(
|
|
17
|
-
this.config.baseUrl =
|
|
17
|
+
setBaseUrl(e) {
|
|
18
|
+
this.config.baseUrl = e;
|
|
18
19
|
}
|
|
19
|
-
setDefaultHeaders(
|
|
20
|
+
setDefaultHeaders(e) {
|
|
20
21
|
this.config.defaultHeaders = {
|
|
21
22
|
...this.config.defaultHeaders,
|
|
22
|
-
...
|
|
23
|
+
...e
|
|
23
24
|
};
|
|
24
25
|
}
|
|
25
|
-
buildUrl(
|
|
26
|
-
let
|
|
27
|
-
if (!
|
|
28
|
-
let
|
|
29
|
-
return Object.entries(
|
|
30
|
-
|
|
31
|
-
}), `${
|
|
32
|
-
}
|
|
33
|
-
mergeHeaders(
|
|
34
|
-
let
|
|
35
|
-
return this.config.defaultHeaders && Object.entries(this.config.defaultHeaders).forEach(([
|
|
36
|
-
|
|
37
|
-
}),
|
|
38
|
-
|
|
39
|
-
}),
|
|
40
|
-
}
|
|
41
|
-
async parseResponse(
|
|
42
|
-
let
|
|
43
|
-
if (
|
|
44
|
-
if (
|
|
45
|
-
if (
|
|
26
|
+
buildUrl(e, h) {
|
|
27
|
+
let g = e.startsWith("http") ? e : `${this.config.baseUrl}${e.startsWith("/") ? e : `/${e}`}`;
|
|
28
|
+
if (!h || Object.keys(h).length === 0) return g;
|
|
29
|
+
let _ = new URLSearchParams();
|
|
30
|
+
return Object.entries(h).forEach(([e, h]) => {
|
|
31
|
+
h != null && _.append(e, String(h));
|
|
32
|
+
}), `${g}${g.includes("?") ? "&" : "?"}${_.toString()}`;
|
|
33
|
+
}
|
|
34
|
+
mergeHeaders(e) {
|
|
35
|
+
let h = new Headers();
|
|
36
|
+
return this.config.defaultHeaders && Object.entries(this.config.defaultHeaders).forEach(([e, g]) => {
|
|
37
|
+
h.set(e, g);
|
|
38
|
+
}), e && Object.entries(e).forEach(([e, g]) => {
|
|
39
|
+
h.set(e, g);
|
|
40
|
+
}), h;
|
|
41
|
+
}
|
|
42
|
+
async parseResponse(e) {
|
|
43
|
+
let h = e.headers.get("content-type") || "";
|
|
44
|
+
if (h.includes("application/json")) return await e.json();
|
|
45
|
+
if (h.includes("text/")) return await e.text();
|
|
46
|
+
if (h.includes("application/octet-stream") || h.includes("application/pdf")) return await e.blob();
|
|
46
47
|
try {
|
|
47
|
-
return await
|
|
48
|
+
return await e.json();
|
|
48
49
|
} catch {
|
|
49
|
-
return await
|
|
50
|
+
return await e.text();
|
|
50
51
|
}
|
|
51
52
|
}
|
|
52
|
-
async handleError(
|
|
53
|
-
let
|
|
53
|
+
async handleError(e) {
|
|
54
|
+
let h;
|
|
54
55
|
try {
|
|
55
|
-
|
|
56
|
+
h = await this.parseResponse(e);
|
|
56
57
|
} catch {
|
|
57
|
-
|
|
58
|
+
h = await e.text().catch(() => null);
|
|
58
59
|
}
|
|
59
|
-
throw new HttpError(
|
|
60
|
+
throw new HttpError(e.status, e.statusText, h, `HTTP ${e.status}: ${e.statusText}`);
|
|
60
61
|
}
|
|
61
|
-
createAbortController(
|
|
62
|
-
if (!
|
|
63
|
-
let
|
|
62
|
+
createAbortController(e) {
|
|
63
|
+
if (!e && !this.config.timeout) return null;
|
|
64
|
+
let h = new AbortController(), g = e || this.config.timeout || 3e4;
|
|
64
65
|
return setTimeout(() => {
|
|
65
|
-
|
|
66
|
-
},
|
|
66
|
+
h.abort();
|
|
67
|
+
}, g), h;
|
|
67
68
|
}
|
|
68
|
-
async request(
|
|
69
|
-
let { method:
|
|
69
|
+
async request(e, h = {}) {
|
|
70
|
+
let { method: _ = "GET", headers: v, body: y, params: b, timeout: x } = h, S = this.buildUrl(e, b), C = this.mergeHeaders(v), w = this.createAbortController(x);
|
|
70
71
|
try {
|
|
71
|
-
let
|
|
72
|
-
method:
|
|
73
|
-
headers:
|
|
74
|
-
signal:
|
|
72
|
+
let e = {
|
|
73
|
+
method: _,
|
|
74
|
+
headers: C,
|
|
75
|
+
signal: w?.signal
|
|
75
76
|
};
|
|
76
|
-
if (
|
|
77
|
-
else if (
|
|
78
|
-
if (
|
|
79
|
-
let
|
|
80
|
-
|
|
77
|
+
if (y !== void 0 && _ !== "GET") if (typeof y == "string") e.body = y;
|
|
78
|
+
else if (y instanceof FormData || y instanceof Blob) {
|
|
79
|
+
if (e.body = y, y instanceof FormData) {
|
|
80
|
+
let h = new Headers(C);
|
|
81
|
+
h.delete("Content-Type"), e.headers = h;
|
|
81
82
|
}
|
|
82
|
-
} else
|
|
83
|
-
let
|
|
84
|
-
return
|
|
85
|
-
data: await this.parseResponse(
|
|
86
|
-
status:
|
|
87
|
-
statusText:
|
|
88
|
-
headers:
|
|
83
|
+
} else e.body = JSON.stringify(y);
|
|
84
|
+
let h = await fetch(S, e);
|
|
85
|
+
return h.ok || await this.handleError(h), {
|
|
86
|
+
data: await this.parseResponse(h),
|
|
87
|
+
status: h.status,
|
|
88
|
+
statusText: h.statusText,
|
|
89
|
+
headers: h.headers
|
|
89
90
|
};
|
|
90
|
-
} catch (
|
|
91
|
-
throw
|
|
91
|
+
} catch (e) {
|
|
92
|
+
throw e instanceof HttpError ? e : e instanceof Error && e.name === "AbortError" ? new HttpError(408, "Request Timeout", null, `Request timeout after ${x || this.config.timeout || 3e4}ms`) : new HttpError(0, "Network Error", null, e instanceof Error ? e.message : "Unknown error occurred");
|
|
92
93
|
}
|
|
93
94
|
}
|
|
94
|
-
async get(
|
|
95
|
-
return this.request(
|
|
96
|
-
...
|
|
95
|
+
async get(e, h) {
|
|
96
|
+
return this.request(e, {
|
|
97
|
+
...h,
|
|
97
98
|
method: "GET"
|
|
98
99
|
});
|
|
99
100
|
}
|
|
100
|
-
async post(
|
|
101
|
-
return this.request(
|
|
102
|
-
...
|
|
101
|
+
async post(e, h, g) {
|
|
102
|
+
return this.request(e, {
|
|
103
|
+
...g,
|
|
103
104
|
method: "POST",
|
|
104
|
-
body:
|
|
105
|
+
body: h
|
|
105
106
|
});
|
|
106
107
|
}
|
|
107
|
-
async put(
|
|
108
|
-
return this.request(
|
|
109
|
-
...
|
|
108
|
+
async put(e, h, g) {
|
|
109
|
+
return this.request(e, {
|
|
110
|
+
...g,
|
|
110
111
|
method: "PUT",
|
|
111
|
-
body:
|
|
112
|
+
body: h
|
|
112
113
|
});
|
|
113
114
|
}
|
|
114
|
-
async patch(
|
|
115
|
-
return this.request(
|
|
116
|
-
...
|
|
115
|
+
async patch(e, h, g) {
|
|
116
|
+
return this.request(e, {
|
|
117
|
+
...g,
|
|
117
118
|
method: "PATCH",
|
|
118
|
-
body:
|
|
119
|
+
body: h
|
|
119
120
|
});
|
|
120
121
|
}
|
|
121
|
-
async delete(
|
|
122
|
-
return this.request(
|
|
123
|
-
...
|
|
122
|
+
async delete(e, h) {
|
|
123
|
+
return this.request(e, {
|
|
124
|
+
...h,
|
|
124
125
|
method: "DELETE"
|
|
125
126
|
});
|
|
126
127
|
}
|
|
127
128
|
}, LivemapService = class {
|
|
128
129
|
httpClient;
|
|
129
|
-
constructor(
|
|
130
|
-
this.httpClient = new HttpClient({ baseUrl:
|
|
130
|
+
constructor(e) {
|
|
131
|
+
this.httpClient = new HttpClient({ baseUrl: e });
|
|
131
132
|
}
|
|
132
|
-
async fetchLivemap(
|
|
133
|
-
return (await this.httpClient.get(`/livemaps/${
|
|
133
|
+
async fetchLivemap(e) {
|
|
134
|
+
return (await this.httpClient.get(`/livemaps/${e}`)).data;
|
|
134
135
|
}
|
|
135
136
|
}, livemap_snippet_default = {
|
|
136
137
|
properties: /* @__PURE__ */ JSON.parse("{\"actionbuttons\":{\"default\":{\"withlabel\":false},\"description\":\"Configuration relative to the action buttons\",\"properties\":{\"withlabel\":{\"default\":false,\"description\":\"Enable label on action buttons\",\"type\":\"boolean\"}},\"type\":\"object\"},\"analytics\":{\"default\":null,\"description\":\"Parameters relative to analytics\",\"type\":\"object\",\"properties\":{\"gtagIDs\":{\"default\":[],\"description\":\"Gtag IDs to configure\",\"type\":\"array\",\"items\":{\"type\":\"string\"}}}},\"arnavigationdata\":{\"default\":{\"arRadius\":1000,\"audio\":false,\"maxDistanceNavigation\":10000,\"default\":\"outdoor\",\"cursorVisible\":true,\"cursorTimeout\":1000,\"mapFooter\":false,\"indoor\":{\"accuracyThreshold\":8,\"end\":{\"geofence\":5,\"visibleDistance\":200},\"instructions\":{\"geofence\":3,\"maxDistance\":10,\"minAlt\":1,\"opacityDistanceStart\":10,\"realSizeScale\":1,\"scale\":0.06,\"audioDistance\":10},\"itinerary\":{\"sampling\":1.6,\"opacityDistanceEnd\":15,\"arrowTargetDistance\":5},\"mapmatching\":{\"network\":null,\"maxAngleBearing\":30,\"maxDistance\":15,\"minDistance\":1,\"useItineraryStartAsPosition\":false,\"useOrientationMatching\":true,\"useStrict\":false,\"hugeJumpDistance\":3,\"minStepsBetweenOrientationMatching\":3,\"minStepsForOrientationMatching\":5,\"lastProjectionsWindowSize\":3,\"lastProjectionsEdgeAngleThreshold\":3,\"disableMMCloseToATurnDistance\":2},\"multilevel\":{\"geofenceDisableNav\":3},\"pinpoints\":{\"scale\":0.09,\"updateDistance\":30,\"minDistance\":1,\"overlap\":false,\"label\":true}},\"outdoor\":{\"accuracyThreshold\":25,\"end\":{\"geofence\":15,\"visibleDistance\":200},\"instructions\":{\"geofence\":10,\"maxDistance\":40,\"minAlt\":1.5,\"opacityDistanceStart\":20,\"realSizeScale\":3,\"scale\":0.03,\"audioDistance\":30},\"itinerary\":{\"sampling\":1.6,\"opacityDistanceEnd\":30,\"arrowTargetDistance\":10},\"mapmatching\":{\"network\":null,\"maxAngleBearing\":30,\"maxDistance\":50,\"minDistance\":0,\"useItineraryStartAsPosition\":false,\"useOrientationMatching\":true,\"useStrict\":false,\"hugeJumpDistance\":3,\"minStepsBetweenOrientationMatching\":3,\"minStepsForOrientationMatching\":5,\"lastProjectionsWindowSize\":3,\"lastProjectionsEdgeAngleThreshold\":3,\"disableMMCloseToATurnDistance\":2},\"multilevel\":{\"geofenceDisableNav\":3},\"pinpoints\":{\"scale\":0.09,\"updateDistance\":30,\"minDistance\":1,\"overlap\":false,\"label\":true}},\"providers\":{\"blacklist\":[],\"gnssWifi\":{\"discardPositionsAbove\":50,\"enableHighAccuracy\":true},\"polestarkey\":null,\"straightLineDetector\":{\"stepsConsideredForStraightLine\":2},\"stepDetector\":{\"algorithm\":\"minMaxPeaks2\",\"stepSizeMultiplier\":1,\"minMaxPeaks2\":null,\"minMaxPeaks3\":null},\"useMapMatching\":true,\"usePositionSmoother\":true,\"useAllAbsolutePositions\":false,\"vps\":null,\"whitelist\":[]},\"visibleTags\":[]},\"description\":\"Configuration relative to the AR navigation \",\"properties\":{\"arRadius\":{\"default\":1000,\"description\":\"Maximum distance for the displayed pinpoints in AR view (in meters)\",\"type\":\"integer\"},\"default\":{\"default\":\"outdoor\",\"description\":\"The default value for the ar navigation parameters\",\"type\":\"string\"},\"audio\":{\"default\":false,\"description\":\"If the user should be guided with audio\",\"type\":\"boolean\"},\"cursorVisible\":{\"default\":true,\"description\":\"If the cursor should be visible\",\"type\":\"boolean\"},\"cursorTimeout\":{\"default\":1000,\"description\":\"The timeout to open a pinpoint with the cursor\",\"type\":\"number\"},\"maxDistanceNavigation\":{\"default\":10000,\"description\":\"The max distance where the navigation is started directly\",\"type\":\"number\"},\"mapFooter\":{\"default\":false,\"description\":\"If the map should be shown at footer on navigation\",\"type\":\"boolean\"},\"indoor\":{\"default\":{\"accuracyThreshold\":8,\"end\":{\"geofence\":5,\"visibleDistance\":200},\"instructions\":{\"geofence\":3,\"maxDistance\":10,\"minAlt\":1,\"opacityDistanceStart\":10,\"realSizeScale\":1,\"scale\":0.06,\"audioDistance\":10},\"itinerary\":{\"sampling\":1.6,\"opacityDistanceEnd\":15,\"arrowTargetDistance\":5},\"mapmatching\":{\"network\":null,\"maxAngleBearing\":30,\"maxDistance\":15,\"minDistance\":1,\"useItineraryStartAsPosition\":false,\"useOrientationMatching\":true,\"useStrict\":false,\"hugeJumpDistance\":3,\"minStepsBetweenOrientationMatching\":3,\"minStepsForOrientationMatching\":5,\"lastProjectionsWindowSize\":3,\"lastProjectionsEdgeAngleThreshold\":3,\"disableMMCloseToATurnDistance\":2},\"multilevel\":{\"geofenceDisableNav\":3},\"pinpoints\":{\"scale\":0.09,\"updateDistance\":30,\"minDistance\":1,\"overlap\":false,\"label\":true}},\"properties\":{\"accuracyThreshold\":{\"default\":8,\"type\":\"integer\"},\"end\":{\"default\":{\"geofence\":5,\"visibleDistance\":200},\"type\":\"object\",\"properties\":{\"geofence\":{\"type\":\"integer\",\"default\":5},\"visibleDistance\":{\"type\":\"integer\",\"default\":200}}},\"instructions\":{\"default\":{\"geofence\":3,\"maxDistance\":10,\"minAlt\":1,\"opacityDistanceStart\":10,\"realSizeScale\":1,\"scale\":0.06,\"audioDistance\":10},\"type\":\"object\",\"properties\":{\"geofence\":{\"type\":\"integer\",\"default\":3},\"maxDistance\":{\"type\":\"integer\",\"description\":\"Distance from which the instruction will be display instead of banner with meters\",\"default\":10},\"minAlt\":{\"type\":\"integer\",\"default\":1},\"opacityDistanceStart\":{\"type\":\"integer\",\"default\":10},\"realSizeScale\":{\"type\":\"integer\",\"default\":1},\"scale\":{\"type\":\"number\",\"default\":0.06},\"audioDistance\":{\"type\":\"integer\",\"description\":\"Distance from which the audio will be triggered between 2 steps\",\"default\":10}}},\"itinerary\":{\"default\":{\"sampling\":1.6,\"opacityDistanceEnd\":15,\"arrowTargetDistance\":5},\"type\":\"object\",\"properties\":{\"sampling\":{\"type\":\"integer\",\"default\":1.6},\"opacityDistanceEnd\":{\"type\":\"integer\",\"default\":15},\"arrowTargetDistance\":{\"type\":\"integer\",\"default\":5}}},\"mapmatching\":{\"default\":{\"network\":null,\"maxAngleBearing\":30,\"maxDistance\":15,\"minDistance\":1,\"useItineraryStartAsPosition\":false,\"useOrientationMatching\":true,\"useStrict\":false,\"hugeJumpDistance\":3,\"minStepsBetweenOrientationMatching\":3,\"minStepsForOrientationMatching\":5,\"lastProjectionsWindowSize\":3,\"lastProjectionsEdgeAngleThreshold\":3,\"disableMMCloseToATurnDistance\":2},\"type\":\"object\",\"properties\":{\"network\":{\"type\":\"string\",\"description\":\"Network to use outside a navigation\",\"default\":null},\"maxAngleBearing\":{\"type\":\"integer\",\"default\":30},\"maxDistance\":{\"type\":\"integer\",\"default\":15},\"minDistance\":{\"type\":\"integer\",\"default\":1},\"useItineraryStartAsPosition\":{\"type\":\"boolean\",\"default\":false},\"useOrientationMatching\":{\"type\":\"boolean\",\"default\":true},\"useStrict\":{\"type\":\"boolean\",\"default\":false},\"hugeJumpDistance\":{\"type\":\"number\",\"default\":3},\"minStepsBetweenOrientationMatching\":{\"type\":\"number\",\"default\":3},\"minStepsForOrientationMatching\":{\"type\":\"number\",\"default\":5},\"lastProjectionsWindowSize\":{\"type\":\"number\",\"default\":3},\"lastProjectionsEdgeAngleThreshold\":{\"type\":\"number\",\"default\":3},\"disableMMCloseToATurnDistance\":{\"type\":\"number\",\"default\":2}}},\"multilevel\":{\"default\":{\"geofenceDisableNav\":3},\"type\":\"object\",\"properties\":{\"geofenceDisableNav\":{\"type\":\"integer\",\"default\":3}}},\"pinpoints\":{\"default\":{\"scale\":0.09,\"updateDistance\":30,\"minDistance\":1,\"overlap\":false,\"label\":true},\"type\":\"object\",\"properties\":{\"scale\":{\"type\":\"number\",\"default\":0.09},\"updateDistance\":{\"type\":\"integer\",\"default\":30},\"minDistance\":{\"type\":\"integer\",\"default\":1},\"overlap\":{\"default\":false,\"description\":\"If pinpoint shape in AR should overlap between each other\",\"type\":\"boolean\"},\"label\":{\"default\":true,\"description\":\"If pinpoint shape in AR should have label\",\"type\":\"boolean\"}}}},\"description\":\"The indoor set of parameters\",\"type\":\"object\"},\"outdoor\":{\"default\":{\"accuracyThreshold\":25,\"end\":{\"geofence\":15,\"visibleDistance\":200},\"instructions\":{\"maxDistance\":40,\"geofence\":10,\"minAlt\":1.5,\"opacityDistanceStart\":20,\"realSizeScale\":3,\"scale\":0.03,\"audioDistance\":30},\"itinerary\":{\"sampling\":1.6,\"opacityDistanceEnd\":30,\"arrowTargetDistance\":10},\"mapmatching\":{\"network\":null,\"maxAngleBearing\":30,\"maxDistance\":50,\"minDistance\":0,\"useItineraryStartAsPosition\":false,\"useOrientationMatching\":true,\"useStrict\":false,\"hugeJumpDistance\":3,\"minStepsBetweenOrientationMatching\":3,\"minStepsForOrientationMatching\":5,\"lastProjectionsWindowSize\":3,\"lastProjectionsEdgeAngleThreshold\":3,\"disableMMCloseToATurnDistance\":2},\"multilevel\":{\"geofenceDisableNav\":3},\"pinpoints\":{\"scale\":0.09,\"updateDistance\":30,\"minDistance\":1,\"overlap\":false,\"label\":true}},\"properties\":{\"accuracyThreshold\":{\"default\":25,\"type\":\"integer\"},\"end\":{\"default\":{\"geofence\":15,\"visibleDistance\":200},\"type\":\"object\",\"properties\":{\"geofence\":{\"type\":\"integer\",\"default\":15},\"visibleDistance\":{\"type\":\"integer\",\"default\":200}}},\"instructions\":{\"default\":{\"geofence\":10,\"maxDistance\":40,\"minAlt\":1.5,\"opacityDistanceStart\":20,\"realSizeScale\":3,\"scale\":0.03,\"audioDistance\":30},\"type\":\"object\",\"properties\":{\"geofence\":{\"type\":\"integer\",\"default\":10},\"maxDistance\":{\"type\":\"integer\",\"description\":\"Distance from which the instruction will be display instead of banner with meters\",\"default\":40},\"minAlt\":{\"type\":\"integer\",\"default\":1.5},\"opacityDistanceStart\":{\"type\":\"integer\",\"default\":20},\"realSizeScale\":{\"type\":\"integer\",\"default\":3},\"scale\":{\"type\":\"number\",\"default\":0.03},\"audioDistance\":{\"type\":\"integer\",\"description\":\"Distance from which the audio will be triggered between 2 instructions\",\"default\":30}}},\"itinerary\":{\"default\":{\"sampling\":1.6,\"opacityDistanceEnd\":30,\"arrowTargetDistance\":10},\"type\":\"object\",\"properties\":{\"sampling\":{\"type\":\"integer\",\"default\":1.6},\"opacityDistanceEnd\":{\"type\":\"integer\",\"default\":30},\"arrowTargetDistance\":{\"type\":\"integer\",\"default\":10}}},\"mapmatching\":{\"default\":{\"network\":null,\"maxAngleBearing\":30,\"maxDistance\":50,\"minDistance\":0,\"useItineraryStartAsPosition\":false,\"useOrientationMatching\":true,\"useStrict\":false,\"hugeJumpDistance\":3,\"minStepsBetweenOrientationMatching\":3,\"minStepsForOrientationMatching\":5,\"lastProjectionsWindowSize\":3,\"lastProjectionsEdgeAngleThreshold\":3,\"disableMMCloseToATurnDistance\":2},\"type\":\"object\",\"properties\":{\"useItineraryStartAsPosition\":{\"type\":\"boolean\",\"default\":false},\"network\":{\"type\":\"string\",\"description\":\"Network to use outside a navigation\",\"default\":null},\"maxAngleBearing\":{\"type\":\"number\",\"default\":30},\"maxDistance\":{\"type\":\"integer\",\"default\":50},\"minDistance\":{\"type\":\"integer\",\"default\":0},\"useOrientationMatching\":{\"type\":\"boolean\",\"default\":true},\"useStrict\":{\"type\":\"boolean\",\"default\":false},\"hugeJumpDistance\":{\"type\":\"number\",\"default\":3},\"minStepsBetweenOrientationMatching\":{\"type\":\"number\",\"default\":3},\"minStepsForOrientationMatching\":{\"type\":\"number\",\"default\":5},\"lastProjectionsWindowSize\":{\"type\":\"number\",\"default\":3},\"lastProjectionsEdgeAngleThreshold\":{\"type\":\"number\",\"default\":3},\"disableMMCloseToATurnDistance\":{\"type\":\"number\",\"default\":2}}},\"multilevel\":{\"default\":{\"geofenceDisableNav\":3},\"type\":\"object\",\"properties\":{\"geofenceDisableNav\":{\"type\":\"integer\",\"default\":3}}},\"pinpoints\":{\"default\":{\"scale\":0.09,\"updateDistance\":30,\"minDistance\":1,\"overlap\":false,\"label\":true},\"type\":\"object\",\"properties\":{\"scale\":{\"type\":\"number\",\"default\":0.09},\"updateDistance\":{\"type\":\"integer\",\"default\":30},\"minDistance\":{\"type\":\"integer\",\"default\":1},\"overlap\":{\"default\":false,\"description\":\"If pinpoint shape in AR should overlap between each other\",\"type\":\"boolean\"},\"label\":{\"default\":true,\"description\":\"If pinpoint shape in AR should have label\",\"type\":\"boolean\"}}}},\"description\":\"The outdoor set of parameters\",\"type\":\"object\"},\"providers\":{\"default\":{\"blacklist\":[],\"gnssWifi\":{\"discardPositionsAbove\":50,\"enableHighAccuracy\":true},\"polestarkey\":null,\"straightLineDetector\":{\"stepsConsideredForStraightLine\":2},\"stepDetector\":{\"algorithm\":\"minMaxPeaks2\",\"stepSizeMultiplier\":1,\"minMaxPeaks2\":null,\"minMaxPeaks3\":null},\"useMapMatching\":true,\"usePositionSmoother\":true,\"useAllAbsolutePositions\":false,\"vps\":null,\"whitelist\":[]},\"properties\":{\"blacklist\":{\"default\":[],\"type\":\"array\"},\"gnssWifi\":{\"default\":{\"discardPositionsAbove\":50,\"enableHighAccuracy\":true},\"properties\":{\"discardPositionsAbove\":{\"default\":50,\"type\":\"number\"},\"enableHighAccuracy\":{\"default\":true,\"type\":\"boolean\"}}},\"polestarkey\":{\"default\":null,\"type\":\"string\"},\"straightLineDetector\":{\"default\":{\"stepsConsideredForStraightLine\":2},\"properties\":{\"stepsConsideredForStraightLine\":{\"default\":2,\"type\":\"number\"}},\"type\":\"object\"},\"stepDetector\":{\"default\":{\"algorithm\":\"minMaxPeaks2\",\"stepSizeMultiplier\":1,\"minMaxPeaks2\":null,\"minMaxPeaks3\":null},\"properties\":{\"algorithm\":{\"default\":\"minMaxPeaks2\",\"enum\":[\"ladetto\",\"minMaxPeaks\",\"minMaxPeaks2\",\"minMaxPeaks3\"],\"type\":\"string\"},\"stepSizeMultiplier\":{\"default\":1,\"type\":\"number\"},\"minMaxPeaks2\":{\"default\":null,\"properties\":{\"windowTime\":{\"default\":0.3,\"type\":\"number\"},\"minTimeBetweenSteps\":{\"default\":0.4,\"type\":\"number\"},\"maxFrequency\":{\"default\":4,\"type\":\"number\"},\"minFrequency\":{\"default\":1,\"type\":\"number\"},\"verticalAccPositivePeakThreshold\":{\"default\":0.75,\"type\":\"number\"},\"verticalAccNegativePeakThreshold\":{\"default\":-0.3,\"type\":\"number\"}},\"type\":\"object\"},\"minMaxPeaks3\":{\"default\":null,\"properties\":{\"windowTime\":{\"default\":0.6,\"type\":\"number\"},\"minTimeBetweenSteps\":{\"default\":0.6,\"type\":\"number\"},\"maxFrequency\":{\"default\":4,\"type\":\"number\"},\"minFrequency\":{\"default\":1,\"type\":\"number\"},\"verticalAccPositivePeakThreshold\":{\"default\":0.2,\"type\":\"number\"},\"verticalAccNegativePeakThreshold\":{\"default\":-0.1,\"type\":\"number\"}},\"type\":\"object\"}},\"type\":\"object\"},\"useMapMatching\":{\"default\":true,\"type\":\"boolean\"},\"usePositionSmoother\":{\"default\":true,\"type\":\"boolean\"},\"useAllAbsolutePositions\":{\"default\":false,\"type\":\"boolean\"},\"vps\":{\"default\":null,\"properties\":{\"endpoint\":{\"default\":null,\"type\":\"string\"},\"minInclinationForRequest\":{\"default\":60,\"type\":\"number\"},\"useInclination\":{\"default\":true,\"type\":\"boolean\"},\"requestInterval\":{\"default\":null,\"type\":\"number\"},\"useCoarsePose\":{\"default\":true,\"type\":\"boolean\"},\"waitTimeMinInclinationForRequest\":{\"default\":200,\"type\":\"number\"}},\"type\":\"object\"},\"whitelist\":{\"default\":[],\"type\":\"array\"}},\"description\":\"Providers to use or not\",\"type\":\"object\"},\"visibleTags\":{\"default\":[],\"type\":\"array\",\"items\":{\"type\":\"string\"}}},\"type\":\"object\"},\"addcid\":{\"default\":false,\"description\":\"Double Click Publisher ID\",\"type\":\"string\"},\"addcslot\":{\"default\":false,\"description\":\"Double Click Ad Slot\",\"type\":\"string\"},\"addcsize\":{\"default\":false,\"description\":\"Double Click Size\",\"items\":{\"items\":{\"type\":\"integer\"},\"maxItems\":2,\"minItems\":2,\"type\":\"array\"},\"type\":\"array\"},\"addctarget\":{\"default\":false,\"description\":\"Double Click Target\",\"items\":{\"items\":{\"type\":\"string\"},\"maxItems\":2,\"minItems\":2,\"type\":\"array\"},\"type\":\"array\"},\"adheight\":{\"default\":false,\"description\":\"Ad display height options.\",\"type\":\"string\"},\"adsenseid\":{\"default\":false,\"description\":\"Adsense\",\"type\":\"integer\"},\"adsenseslot\":{\"default\":false,\"description\":\"Adsense\",\"type\":\"integer\"},\"adwidth\":{\"default\":false,\"description\":\"Ad display width options.\",\"type\":\"string\"},\"aroundme\":{\"default\":true,\"description\":\"Show around button in livemap.\",\"type\":\"boolean\"},\"arviewenabled\":{\"default\":false,\"description\":\"Enable the Wemap-AR view on compatible mobile devices.\",\"type\":\"boolean\"},\"arswitcherbutton\":{\"default\":false,\"description\":\"Use button instead of device inclination for switching AR/map\",\"type\":\"boolean\"},\"autocenter\":{\"default\":0,\"description\":\"Automatic centering on landing area when idle (in milliseconds).\",\"type\":\"integer\"},\"autologin\":{\"default\":true,\"description\":\"Use localStorage to login.\",\"type\":\"boolean\"},\"autoplay\":{\"default\":false,\"description\":\"Slideshow of pinpoints when map is idle.\",\"type\":[\"boolean\",\"object\"]},\"autoplayoverlay\":{\"default\":false,\"description\":\"If true, the autoplay will be locked with an overlay and no interaction will be available\",\"type\":\"boolean\"},\"autoplaytimeout\":{\"default\":5000,\"description\":\"How long until considering the map as idle (in milliseconds).\",\"type\":\"integer\"},\"bodyfullscreen\":{\"default\":false,\"description\":\"If body parent to livemap should be showned in fullscreen mode instead of livemap's container.\",\"type\":\"boolean\"},\"calendarfilterenabled\":{\"default\":false,\"description\":\"Force to enable calendar filter even if useevents is false.\",\"type\":\"boolean\"},\"calendarfiltermindate\":{\"default\":\"\",\"description\":\"Min date at ISO format for calendar filter (filters view & welcome card)\",\"type\":\"string\"},\"calendarfiltermaxdate\":{\"default\":\"\",\"description\":\"Max date at ISO format for calendar filter (filters view & welcome card)\",\"type\":\"string\"},\"cancomment\":{\"default\":true,\"description\":\"Ability to comment/contribute on pinpoints.\",\"type\":\"boolean\"},\"canopenpinpoint\":{\"default\":true,\"description\":\"Ability to open a marker on click.\",\"type\":\"boolean\"},\"clicktofullscreen\":{\"default\":false,\"description\":\"Click on the map to unlock and go fullscreen.\",\"type\":\"boolean\"},\"clicktofullscreendevices\":{\"default\":\"mobile\",\"description\":\"Click on the map to unlock and go fullscreen. Only for specified devices.\",\"enum\":[\"all\",\"mobile\"],\"type\":\"string\"},\"clicktonavigate\":{\"default\":false,\"description\":\"Click on the map to navigate to coordinates\",\"type\":\"boolean\"},\"clientname\":{\"default\":\"\",\"description\":\"Add an additional css class wemap-livemap-<clientname> to the main livemap's container Value can also describe a sub-client: client:sub-client. Eg: allow mcc components customization\",\"type\":\"string\"},\"clustercircle\":{\"default\":false,\"description\":\"Displays a simple circle instead of a cluster icon.\",\"type\":\"boolean\"},\"clustercolor\":{\"default\":\"#015697\",\"description\":\"Clusters icons color (requires clustercircle).\",\"type\":\"string\"},\"clustericon\":{\"default\":null,\"description\":\"Cluster icon image (ignored if clustercircle is set).\",\"type\":\"string\"},\"clustering\":{\"default\":true,\"description\":\"Enables front-end side clustering of pinpoints.\",\"type\":\"boolean\"},\"clustermethod\":{\"default\":\"supercluster\",\"description\":\"Algorithm used to group pinpoints into clusters.\",\"enum\":[\"hierarchy\",\"supercluster\"],\"type\":\"string\"},\"clusterplussign\":{\"default\":false,\"description\":\"Replaces the cluster count by a plus sign (requires clustercircle).\",\"type\":\"boolean\"},\"clusterradius\":{\"default\":80,\"description\":\"Configure the radius of the clustering algorithm (and multipoint search area).\",\"type\":\"integer\"},\"custompetals\":{\"type\":\"array\",\"description\":\"List of custom petals that will replace the classic ones.\",\"items\":{\"type\":\"object\",\"description\":\"A custom petal.\",\"properties\":{\"position\":{\"type\":\"integer\",\"description\":\"The position of the custom petal (between 1 and 5).\"},\"iconurl\":{\"type\":\"string\",\"description\":\"The url of the petal icon.\"},\"text\":{\"type\":\"string\",\"description\":\"The text that will be displayed when the petal is hovered.\"},\"actionname\":{\"type\":\"string\",\"description\":\"The action realized when the petal is clicked. The available actions are described in the documentation.\"},\"actionparameters\":{\"type\":\"object\",\"default\":{}}}},\"default\":[]},\"customshareurl\":{\"default\":null,\"description\":\"Custom url for pinpoint sharing.\",\"type\":\"string\"},\"dateonly\":{\"default\":false,\"description\":\"Do not display event hours\",\"type\":\"boolean\"},\"deeplinkingenabled\":{\"description\":\"Enable the update of the url hash when navigate through the application\",\"type\":\"boolean\",\"default\":true},\"displaypoorevent\":{\"default\":true,\"description\":\"Display event as poor event if they don't have description\",\"type\":\"boolean\"},\"dragging\":{\"default\":true,\"description\":\"Enable map dragging with mouse/touch.\",\"type\":\"boolean\"},\"enabledcontrols\":{\"default\":true,\"description\":\"Enable map controls.\",\"type\":\"boolean\"},\"enableembedshare\":{\"default\":true,\"description\":\"Enable/Disable EMBED share on the livemap.\",\"type\":\"boolean\"},\"enablelogin\":{\"default\":true,\"description\":\"Are users allowed to login.\",\"type\":\"boolean\"},\"enablepetals\":{\"default\":true,\"description\":\"Enable/Disable petals components on the livemap.\",\"type\":\"boolean\"},\"enablesidebar\":{\"default\":true,\"description\":\"Enable/Disable sidebar on the livemap.\",\"type\":\"boolean\"},\"expanddescription\":{\"default\":false,\"description\":\"Shows a Read more button at the bottom of pinpoint description.\",\"type\":\"boolean\"},\"externalcontent\":{\"default\":false,\"description\":\"Add HTML content to main container, permits to user to customize its map.\",\"items\":{\"type\":\"string\"},\"type\":\"array\"},\"externalscripts\":{\"default\":false,\"description\":\"External JavaScript defined by user, added as script tags into livemap's document header\",\"items\":{\"properties\":{\"content\":{\"description\":\"JavaScript code.\",\"type\":\"string\"},\"url\":{\"description\":\"The URL from which to fetch the JavaScript code.\",\"type\":\"string\"}},\"type\":\"object\"},\"type\":\"array\"},\"externalstyles\":{\"default\":false,\"description\":\"External stylesheets defined by user, added as style tags into livemap's document header. Could be used to override existent css rule\",\"items\":{\"properties\":{\"content\":{\"description\":\"CSS code.\",\"type\":[\"object\",\"string\"]},\"url\":{\"description\":\"The URL from which to fetch the CSS code.\",\"type\":\"string\"}},\"type\":\"object\"},\"type\":\"array\"},\"featuredlists\":{\"default\":false,\"description\":\"Add a new button with the livemap's title, on click it will open the right sidebar containing all the lists for this map.\",\"type\":\"boolean\"},\"featuretilesenabled\":{\"default\":false,\"description\":\"Enables server-side clustering.\",\"type\":\"boolean\"},\"floors\":{\"default\":[],\"description\":\"Floors for multi-levels maps.\",\"items\":{\"properties\":{\"maxaltitude\":{\"description\":\"The maximum altitude for the floor (exclusive).\",\"title\":\"Maximum altitude\",\"type\":\"number\"},\"minaltitude\":{\"description\":\"The minimum altitude for the floor (inclusive).\",\"title\":\"Minimum altitude\",\"type\":\"number\"},\"name\":{\"title\":\"Name\",\"type\":\"string\"}},\"required\":[\"name\",\"minaltitude\",\"maxaltitude\"],\"type\":\"object\"},\"type\":\"array\"},\"floorsminzoom\":{\"default\":null,\"description\":\"Min zoom to display the floors switcher\",\"type\":\"number\"},\"forcelittlescreenview\":{\"default\":false,\"description\":\"Force to use the 'little screen' display mode if not in mobile view.\",\"type\":\"boolean\"},\"forcemobileview\":{\"default\":false,\"description\":\"Force to add class 'mobile-view' to livemap container and add a class forced-mobileview to livemap container it will also force livemap state.\",\"type\":\"boolean\"},\"fullscreencontrol\":{\"default\":false,\"description\":\"Show/Hide burger menu item 'Goto Fullscreen'.\",\"type\":\"boolean\"},\"geoentities\":{\"default\":{\"hideOthersOnSelect\":true,\"strokeHighlightScale\":1.5},\"properties\":{\"hideOthersOnSelect\":{\"default\":true,\"description\":\"Hide other geoentities when one is selected.\",\"type\":\"boolean\"},\"strokeHighlightScale\":{\"default\":1.5,\"description\":\"Scale factor of stroke width on highlight\",\"type\":\"number\"}},\"description\":\"Enable/Disable geoentities components on the livemap.\",\"type\":\"object\"},\"handlebearing\":{\"default\":false,\"description\":\"Allow map to rotate depending on the device orientation.\",\"type\":\"boolean\"},\"hereandnowcontrol\":{\"default\":false,\"description\":\"Replace geolocate button by a button 'here and now' which also filter on current day.\",\"type\":\"boolean\"},\"homecontrol\":{\"default\":true,\"description\":\"Show/Hide menu item 'Back to first view'.\",\"type\":\"boolean\"},\"howtocontrol\":{\"default\":false,\"description\":\"Show/Hide menu item 'How to use this map'.\",\"type\":\"boolean\"},\"indoor\":{\"default\":{\"enable\":false,\"usePinpoints\":false,\"useLevelSearch\":false,\"limitOutdoorAtLevel\":null,\"highlightEnabled\":true,\"highlightColor\":null,\"highlightOnSearch\":false,\"minZoom\":17,\"enableInteraction\":true},\"properties\":{\"enable\":{\"default\":false,\"description\":\"Enable indoor mode.\",\"type\":\"boolean\"},\"enableInteraction\":{\"default\":true,\"description\":\"Enable/disable interaction with indoor features (hover, click)\",\"type\":\"boolean\"},\"highlightColor\":{\"default\":null,\"description\":\"Color for highlight feature\",\"type\":\"string\"},\"selectedColor\":{\"default\":null,\"description\":\"Color for selected feature\",\"type\":\"string\"},\"highlightEnabled\":{\"default\":true,\"description\":\"Enable/disable highlight feature on click\",\"type\":\"boolean\"},\"highlightOnSearch\":{\"default\":false,\"description\":\"Enable/disable highlight feature on search\",\"type\":\"boolean\"},\"limitOutdoorAtLevel\":{\"default\":null,\"description\":\"Define which level should show outdoor pinpoint. If null all levels will show outdoor pinpoint.\",\"type\":\"number\"},\"minZoom\":{\"default\":17,\"description\":\"Define the zoom level at which indoor mode will be enabled\",\"type\":\"number\"},\"usePinpoints\":{\"default\":false,\"description\":\"If pinpoint are linked to indoor feature. It will automatically open pinpoint on feature click and highlight feature on pinpoint open.\",\"type\":\"boolean\"},\"useLevelSearch\":{\"default\":false,\"description\":\"If pinpoint search is made on the current level. If not, it will search on all levels.\",\"type\":\"boolean\"}},\"description\":\"Configuration relative to indoor\",\"type\":\"object\"},\"initialbearing\":{\"default\":0,\"description\":\"Initial bearing of the map.\",\"type\":\"number\"},\"introcard\":{\"default\":null,\"description\":\"Shows an information popin on map load.\",\"properties\":{\"active\":{\"default\":true,\"description\":\"If not true, the welcomeCard won't be displayed.\",\"title\":\"Active\",\"type\":\"boolean\"},\"avatar\":{\"description\":\"Custom user's avatar image.\",\"title\":\"Avatar URL\",\"type\":\"string\"},\"background\":{\"description\":\"URL background image shown behind the user's avatar, default is user's background image.\",\"title\":\"Background URL\",\"type\":\"string\"},\"class\":{\"description\":\"Custom classnames for the popin.\",\"title\":\"CSS classname\",\"type\":\"string\"},\"enableAroundMe\":{\"default\":false,\"description\":\"Display the 'around me' button on welcome card.\",\"title\":\"Display 'Around me' button\",\"type\":\"boolean\"},\"aroundMeTitle\":{\"title\":\"Title of the around me filter.\",\"description\":\"Title of the around me filter.\",\"type\":\"string\"},\"aroundMeSubtitle\":{\"title\":\"Subtitle of the around me filter.\",\"description\":\"Subtitle of the around me filter.\",\"type\":\"string\"},\"filters\":{\"description\":\"Enable filters on WelcomeCard.\",\"items\":{\"properties\":{\"type\":{\"description\":\"Type of filter.\",\"enum\":[\"tag\",\"when\",\"where\"],\"title\":\"Type of filter\",\"type\":\"string\"},\"title\":{\"description\":\"Title of the filter.\",\"title\":\"Title of the filter.\",\"type\":\"string\"},\"subtitle\":{\"description\":\"Subtitle of the filter.\",\"title\":\"Subtitle of the filter.\",\"type\":\"string\"}},\"type\":\"object\"},\"required\":[\"type\"],\"type\":\"array\"},\"noBackground\":{\"default\":false,\"description\":\"Hide the user's background image.\",\"title\":\"Hide Backround\",\"type\":\"boolean\"},\"permanent\":{\"default\":true,\"description\":\"Show WelcomeCard everytime.\",\"title\":\"Permanent WelcomeCard\",\"type\":\"boolean\"},\"text\":{\"description\":\"Displayed under the title as HTML.\",\"title\":\"HTML Text\",\"type\":\"string\"},\"title\":{\"description\":\"Displayed under the user's avatar with bold font.\",\"title\":\"Title\",\"type\":\"string\"}},\"type\":\"object\"},\"iscontributive\":{\"default\":false,\"description\":\"Tell if the map is contributive or not.\",\"type\":\"boolean\"},\"kiosk\":{\"default\":null,\"description\":\"Kiosk parameters like the photosphere image or position\",\"properties\":{\"list\":{\"type\":\"array\",\"default\":[],\"items\":{\"type\":\"object\",\"default\":null,\"properties\":{\"photosphere\":{\"type\":\"object\",\"default\":null,\"properties\":{\"day\":{\"type\":\"string\"},\"night\":{\"type\":\"string\"}}},\"kioskid\":{\"type\":\"string\",\"default\":\"\"},\"accessibleheight\":{\"type\":\"string\",\"description\":\"Kiosk mode has a max height for interactive button for accessibility purpose\",\"default\":50},\"heading\":{\"description\":\"Heading is used to orient the photosphere according to the map (in degrees)\",\"type\":\"number\",\"default\":0},\"initialorientation\":{\"description\":\"Initial orientation of the view (in degrees)\",\"type\":\"number\",\"default\":0},\"position\":{\"properties\":{\"lat\":{\"description\":\"Latitude of position for photosphere.\",\"title\":\"Latitude\",\"type\":\"number\"},\"lng\":{\"description\":\"Longitude of position for photosphere.\",\"title\":\"Longitude\",\"type\":\"number\"},\"alt\":{\"description\":\"Altitude of position for photosphere.\",\"title\":\"Altitude\",\"type\":\"number\"},\"level\":{\"description\":\"Level of position for photosphere.\",\"title\":\"Level\",\"type\":\"number\"}},\"required\":[\"lat\",\"lng\"],\"type\":\"object\"},\"rotationduration\":{\"description\":\"Rotation of sphere. Number of seconds for a complete loop\",\"type\":\"number\",\"default\":35}}}},\"screensavertype\":{\"type\":\"string\",\"enum\":[\"auto\",null],\"default\":\"auto\"},\"timeoutscreensaver\":{\"type\":\"number\",\"default\":30000},\"type\":{\"type\":\"string\",\"default\":\"default\",\"enum\":[\"default\",\"desktop\"]},\"intro\":{\"type\":\"object\",\"default\":null,\"properties\":{\"text\":{\"type\":\"string\"},\"title\":{\"type\":\"string\"}}}},\"type\":\"object\"},\"kioskid\":{\"default\":null,\"type\":\"string\"},\"kiosk_viewer\":{\"default\":null,\"description\":\"Id of kiosk viewer map\",\"type\":\"string\"},\"layers\":{\"default\":[],\"description\":\"Additional feature layers.\",\"items\":{\"properties\":{\"altitude\":{\"description\":\"The altitude (in meters) of this layer, for multi-floor maps.\",\"title\":\"Altitude\",\"type\":\"number\"},\"clustering\":{\"default\":false,\"description\":\"Use this layer for front-end hierarchy clustering.\",\"title\":\"Clustering\",\"type\":\"boolean\"},\"coordinates\":{\"default\":null,\"description\":\"Coordinates of each corner of the image. It can only be used with layer type image. Represented by an array of coordinates array [lng, lat]\",\"items\":{\"items\":{\"type\":\"number\"},\"type\":\"array\"},\"type\":\"array\"},\"maxzoom\":{\"default\":18,\"description\":\"The maximum zoom at which the layer is visible (exclusive).\",\"minimum\":0,\"title\":\"Maximum zoom\",\"type\":\"integer\"},\"minzoom\":{\"default\":2,\"description\":\"The minimum zoom at which the layer is visible (inclusive).\",\"minimum\":0,\"title\":\"Minimum zoom\",\"type\":\"integer\"},\"onclick\":{\"default\":\"zoom\",\"enum\":[\"ignore\",\"popup\",\"tooltip\",\"zoom\"],\"title\":\"Action on click\",\"type\":\"string\"},\"onhover\":{\"default\":\"highlight\",\"enum\":[\"ignore\",\"highlight\"],\"title\":\"Action on hover\",\"type\":\"string\"},\"type\":{\"description\":\"The type of layer format (GeoJSON, vector tiles or image).\",\"enum\":[\"geojson\",\"image\",\"vector\"],\"title\":\"Type\",\"type\":\"string\"},\"url\":{\"description\":\"The URL from which to fetch the layer's data.\",\"title\":\"URL\",\"type\":\"string\"}},\"required\":[\"type\",\"url\"],\"type\":\"object\"},\"type\":\"array\"},\"limitperpage\":{\"default\":10,\"description\":\"Number of items per page in the livebar.\",\"type\":\"integer\"},\"linksenabled\":{\"default\":true,\"description\":\"Enable clicking on links (in pinpoint description or comments).\",\"type\":\"boolean\"},\"littlescreenthresholdwidth\":{\"default\":1030,\"description\":\"Max width before going to littleScreen mode.\",\"type\":\"integer\"},\"locked\":{\"default\":false,\"description\":\"Lock map, need to click it to unlock and use (no hover).\",\"type\":\"boolean\"},\"mapviewenabled\":{\"default\":true,\"description\":\"If false, hide the map and keep only the UI.\",\"type\":\"boolean\"},\"markersize\":{\"default\":100,\"type\":\"integer\",\"description\":\"Size of the map markers.\"},\"maxbounds\":{\"default\":null,\"description\":\"Restricts the map view to the given bounds.\",\"properties\":{\"_northEast\":{\"properties\":{\"lat\":{\"description\":\"Latitude of upper-right's corner (northEast).\",\"title\":\"NorthEast latitude\",\"type\":\"number\"},\"lng\":{\"description\":\"Longitude of upper-right's corner (northEast).\",\"title\":\"NorthEast longitude\",\"type\":\"number\"}},\"required\":[\"lat\",\"lng\"],\"type\":\"object\"},\"_southWest\":{\"properties\":{\"lat\":{\"description\":\"Latitude of bottom-left's corner (southWest).\",\"title\":\"SouthWest latitude\",\"type\":\"number\"},\"lng\":{\"description\":\"Longitude of bottom-left's corner (southWest).\",\"title\":\"SouthWest longitude\",\"type\":\"number\"}},\"required\":[\"lat\",\"lng\"],\"type\":\"object\"}},\"required\":[\"_northEast\",\"_southWest\"],\"type\":\"object\"},\"maximagewidth\":{\"default\":500,\"description\":\"Sets the maximum image width in sidebar. (in px)\",\"type\":\"integer\"},\"maxzoom\":{\"default\":18,\"description\":\"Maximum zoom level of the map.\",\"maximum\":24,\"minimum\":0,\"type\":\"integer\"},\"maxzoomcluster\":{\"default\":null,\"description\":\"Maximum zoom for clustering. Default will be maxzoom\",\"maximum\":24,\"minimum\":0,\"type\":\"integer\"},\"menuextensions\":{\"default\":false,\"description\":\"Add options to the livemap menu.\",\"items\":{\"properties\":{\"icon\":{\"description\":\"Name of Font-Awesome Icon.\",\"title\":\"Icon\",\"type\":\"string\"},\"text\":{\"description\":\"Label for custom button.\",\"title\":\"Button's Label\",\"type\":\"string\"},\"url\":{\"description\":\"URL to redirect from.\",\"title\":\"URL\",\"type\":\"string\"}},\"type\":\"object\"},\"type\":\"array\"},\"minzoom\":{\"default\":2,\"description\":\"Minimum zoom level of the map.\",\"maximum\":24,\"minimum\":0,\"type\":\"integer\"},\"mobilethresholdwidth\":{\"default\":630,\"description\":\"When to consider the map as small/mobile. (main application container will be prefixed by 'mobile-view' class)\",\"type\":\"integer\"},\"mode\":{\"default\":\"default\",\"description\":\"Define the mode of the livemap if it should be with AR, for navigation or kiosk. This will change the UI and features\",\"enum\":[\"default\",\"kiosk_map\",\"kiosk_viewer\",\"kiosk_screensaver_map\"],\"type\":\"string\"},\"models\":{\"default\":null,\"description\":\"Define the URL of the 3d models to load in the map.\",\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\"},\"visible\":{\"default\":\"always\",\"enum\":[\"always\",\"3d\"]},\"url\":{\"type\":\"string\"},\"minzoom\":{\"default\":0,\"type\":\"number\"},\"maxzoom\":{\"default\":24,\"type\":\"number\"}}}},\"navigatefromposition\":{\"default\":true,\"description\":\"If it should use user location for itineraries\",\"type\":\"boolean\"},\"offline\":{\"default\":{\"blacklist\":[],\"enable\":false,\"tiles\":null},\"description\":\"Configuration relative to the offline.\",\"properties\":{\"blacklist\":{\"default\":[],\"description\":\"Array of list to not use for offline\",\"type\":\"array\"},\"enable\":{\"default\":false,\"description\":\"Enable the offline feature\",\"type\":\"boolean\"},\"tiles\":{\"default\":null,\"description\":\"Mbtiles file to load for offline tiles\",\"type\":\"string\"}},\"type\":\"object\"},\"openedsearch\":{\"default\":false,\"description\":\"Open search bar at startup (if not opened at startup it can opened on click on search button).\",\"type\":\"boolean\"},\"openeventinpinpoint\":{\"default\":false,\"description\":\"Open event inside the pinpoint view instead of opening new view\",\"type\":\"boolean\"},\"imageoperation\":{\"default\":{\"thumbnail\":\"fit\",\"sidebar\":\"fit\"},\"description\":\"Operation applied to the image by the backend\",\"properties\":{\"thumbnail\":{\"default\":\"fit\",\"description\":\"operation applied for images used in map thumbnails\",\"type\":\"string\",\"enum\":[\"contain\",\"fit\"]},\"sidebar\":{\"default\":\"fit\",\"description\":\"operation applied for images used in sidebar\",\"type\":\"string\",\"enum\":[\"contain\",\"fit\"]}},\"type\":\"object\"},\"openedsidebar\":{\"description\":\"Open sidebar by default on featured list or sources ('featured' or 'sources').\",\"enum\":[\"\",\"featured\",\"sources\"],\"default\":\"\",\"type\":\"string\"},\"pinpointopentype\":{\"description\":\"Defined how the pinpoint should be opened, if it opens from the sidebar or with a popin\",\"default\":\"sidebar\",\"enum\":[\"sidebar\",\"popin\"],\"type\":\"string\"},\"pitchenabled\":{\"description\":\"Allow user to pitching and bearing map\",\"type\":\"boolean\",\"default\":false},\"pitchstart\":{\"description\":\"initial pitch (tilt) of the map, measured in degrees away from the plane of the screen (0-60)\",\"type\":\"integer\",\"default\":0},\"pitchswitcherbutton\":{\"description\":\"Show a button to switch pitch\",\"type\":\"boolean\",\"default\":false},\"providersenabled\":{\"description\":\"Use providers to locate the user\",\"type\":\"boolean\",\"default\":true},\"metarouterurl\":{\"default\":null,\"description\":\"The meta router url to use\",\"type\":\"string\"},\"routingtype\":{\"default\":\"google\",\"description\":\"The provider to use for routing.\",\"enum\":[\"google\",\"deutsche-bahn\",\"osrm\",\"otp\",\"cityway\",\"idfm\",\"navitia\",\"tictactrip\"],\"type\":\"string\"},\"routingurl\":{\"default\":\"https://routing-osrm.getwemap.com\",\"description\":\"The root URL for the OSRM routing server.\",\"type\":\"string\"},\"routingmode\":{\"default\":\"driving\",\"description\":\"Mode of routing.\",\"enum\":[\"driving\",\"walking\",\"bike\",\"bus\",\"multi\"],\"type\":\"string\"},\"samewindow\":{\"default\":false,\"description\":\"Open links (from pinpoints descriptions or comments) in the same page.\",\"type\":\"boolean\"},\"scaninstructions\":{\"default\":\"\",\"description\":\"Instruction message displayed when the scan view is open.\",\"type\":\"string\"},\"scrollwheelzoom\":{\"default\":true,\"description\":\"Enable zoom using the scrollwheel.\",\"type\":\"boolean\"},\"searchcontrol\":{\"default\":true,\"description\":\"Show/hide search button.\",\"type\":\"boolean\"},\"searchparameters\":{\"default\":{\"geocoding\":true,\"region\":null,\"multilevel\":false,\"boundingbox\":null,\"extended\":false,\"sortbyname\":null,\"query_fields\":null,\"sortbydistance\":null},\"description\":\"Configuration relative to the search engine\",\"properties\":{\"extended\":{\"default\":false,\"description\":\"Extend search will search on bigger bounds even if results not empty\",\"type\":\"boolean\"},\"geocoding\":{\"default\":true,\"description\":\"Enable geocoding for search\",\"type\":\"boolean\"},\"multilevel\":{\"default\":false,\"description\":\"Enable search on all level instead of current level\",\"type\":\"boolean\"},\"region\":{\"default\":null,\"description\":\"Specify the region (country) in which the geocoding search should be done\",\"type\":\"string\"},\"sortbyname\":{\"default\":null,\"description\":\"Specify the sorting results method\",\"type\":\"string\",\"enum\":[\"ASC\",\"DESC\"]},\"query_fields\":{\"default\":null,\"description\":\"Specify fields to search on\",\"type\":\"string\"},\"sortbydistance\":{\"default\":false,\"description\":\"Specify the sorting results by distance\",\"type\":\"boolean\"},\"boundingbox\":{\"default\":null,\"description\":\"Limit results to only those contained within the supplied bounding box.\",\"properties\":{\"_northEast\":{\"properties\":{\"lat\":{\"description\":\"Latitude of upper-right's corner (northEast).\",\"title\":\"NorthEast latitude\",\"type\":\"number\"},\"lng\":{\"description\":\"Longitude of upper-right's corner (northEast).\",\"title\":\"NorthEast longitude\",\"type\":\"number\"}},\"required\":[\"lat\",\"lng\"],\"type\":\"object\"},\"_southWest\":{\"properties\":{\"lat\":{\"description\":\"Latitude of bottom-left's corner (southWest).\",\"title\":\"SouthWest latitude\",\"type\":\"number\"},\"lng\":{\"description\":\"Longitude of bottom-left's corner (southWest).\",\"title\":\"SouthWest longitude\",\"type\":\"number\"}},\"required\":[\"lat\",\"lng\"],\"type\":\"object\"}},\"required\":[\"_northEast\",\"_southWest\"],\"type\":\"object\"}},\"type\":\"object\"},\"searchplaceholder\":{\"default\":null,\"description\":\"Override search input placeholder.\",\"type\":\"object\"},\"searchclustertiles\":{\"default\":false,\"description\":\"If the search request should return clusters\",\"type\":\"boolean\"},\"seo\":{\"default\":null,\"description\":\"Configuration relative to the SEO.\",\"properties\":{\"bindPageTitleToOpenedEntity\":{\"default\":true,\"description\":\"Replace the page title by the name of the opened entity.\",\"type\":\"boolean\"},\"pageTitleBindingPrefix\":{\"default\":\"\",\"description\":\"When the page title is binded to the content, you can configure the base of the title with this parameter. The final page title will be the concatenation of this parameter and the opened entity name.\",\"type\":\"string\"},\"baseUrl\":{\"default\":\"\",\"description\":\"Base url for the SEO.\",\"type\":\"string\"},\"bindPageDescriptionToOpenedEntity\":{\"default\":true,\"description\":\"Replace the page description by the description of the opened entity.\",\"type\":\"boolean\"},\"bindSchemaToOpenedEntity\":{\"default\":true,\"description\":\"Generate the schema.org structure based on the opened content.\",\"type\":\"boolean\"}},\"type\":\"object\"},\"services\":{\"default\":{\"g7\":false,\"uber\":false,\"velib\":false},\"description\":\"Configuration relative to the external services.\",\"properties\":{\"g7\":{\"default\":false,\"description\":\"Use G7 services\",\"type\":\"boolean\"},\"uber\":{\"default\":false,\"description\":\"Use Uber services\",\"type\":\"boolean\"},\"velib\":{\"default\":false,\"description\":\"Use velib services\",\"type\":\"boolean\"}},\"type\":\"object\"},\"sharesnippet\":{\"default\":false,\"description\":\"Enables the sharing of livemaps (shows a button).\",\"type\":\"boolean\"},\"showaddress\":{\"default\":true,\"description\":\"Show pinpoint's address.\",\"type\":\"boolean\"},\"showauthor\":{\"default\":true,\"description\":\"Show pinpoint's author.\",\"type\":\"boolean\"},\"showfinishedeventscontrol\":{\"default\":true,\"description\":\"Display a checkbox to hide/show the finished events.\",\"type\":\"boolean\"},\"showmediainresults\":{\"default\":false,\"description\":\"Show/hide media in result list\",\"type\":\"boolean\"},\"showmultilevel\":{\"default\":{\"position\":false,\"itinerary\":false},\"description\":\"Show/hide element depending on current floor for a multilevel map\",\"properties\":{\"position\":{\"type\":\"boolean\",\"default\":false},\"itinerary\":{\"type\":\"boolean\",\"default\":false}},\"type\":\"object\"},\"showpinpointmedia\":{\"default\":true,\"description\":\"Show/hide media (picture or video) in pinpoint detailed description\",\"type\":\"boolean\"},\"showrelatedlists\":{\"default\":true,\"description\":\"Show the lists pinpoints belong to.\",\"type\":\"boolean\"},\"showrelativedate\":{\"default\":true,\"description\":\"Show pinpoint's relative creation date.\",\"type\":\"boolean\"},\"sidebarsforceopen\":{\"default\":[\"navigation\",\"direction\"],\"description\":\"Force sidebar to be opened even if parameter enablesidebar is set to false\",\"type\":\"array\",\"items\":{\"type\":\"string\",\"enum\":[\"pinpoint\",\"event\",\"lists\",\"multipoint\",\"sources\",\"navigation\"]}},\"stillswitch\":{\"default\":false,\"description\":\"Should the map stay still (in location) when switching emm ?\",\"type\":\"boolean\"},\"switcher\":{\"default\":null,\"description\":\"Switch between livemaps via theirs emmid.\",\"properties\":{\"direction\":{\"type\":\"string\"},\"items\":{\"items\":{\"properties\":{\"action\":{\"properties\":{\"type\":{\"emmid\":\"string\"}},\"type\":\"object\"},\"icon\":{\"properties\":{\"content\":{\"type\":\"string\"},\"place\":{\"type\":\"string\"},\"style\":{\"type\":\"object\"},\"type\":{\"type\":\"string\"}},\"type\":\"object\"},\"text\":{\"type\":\"string\"}},\"type\":\"object\"},\"type\":\"array\"},\"itemsStyle\":{\"type\":\"object\"},\"itemsStyleActive\":{\"type\":\"object\"},\"itemsStyleHover\":{\"type\":\"object\"},\"style\":{\"type\":\"object\"}},\"type\":\"object\"},\"tagsoverlap\":{\"default\":false,\"description\":\"Enable/disable OR/AND logic for tags filtering\",\"type\":\"boolean\"},\"tilesstyle\":{\"default\":\"https://tiles.getwemap.com/styles/wemap-v2-en/style.json\",\"description\":\"URL for the vector tiles style.\",\"type\":\"string\"},\"tilestoken\":{\"default\":null,\"description\":\"Token for the vector tiles style. (ex : using Mapbox Terrain, or Mapbox Satellite)\",\"type\":\"string\"},\"timecircle\":{\"default\":null,\"description\":\"Circle of distance to go in given time\",\"properties\":{\"type\":{\"type\":\"string\",\"default\":\"walk\"},\"time\":{\"type\":\"integer\",\"default\":300}},\"type\":\"object\"},\"uber\":{\"default\":false,\"description\":\"Add Uber to pinpoint petals.\",\"type\":\"boolean\"},\"useevents\":{\"default\":false,\"description\":\"Current map should use entities events or not.\",\"type\":\"boolean\"},\"usertour\":{\"type\":\"object\",\"default\":null,\"description\":\"Display a user tour at first start if enabled.\",\"properties\":{\"active\":{\"type\":\"boolean\",\"default\":true,\"description\":\"Enable or disable the user tour.\"},\"steps\":{\"type\":\"array\",\"default\":[],\"description\":\"Steps of the user tour.\",\"items\":{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"description\":\"Type of the step\",\"enum\":[\"filterButton\",\"menuButton\",\"livebarButton\",\"pinpointPetals\",\"shareViewButton\",\"custom\"]},\"body\":{\"type\":\"string\",\"description\":\"Text of the step\"},\"selector\":{\"type\":\"string\",\"description\":\"Selector to get the element to point with this step.\"},\"routename\":{\"type\":\"string\",\"description\":\"Name of the route to navigate before displaying the step tooltip.\"},\"routeparams\":{\"type\":\"object\",\"description\":\"Parameters of the route to navigate before displaying the step tooltip.\",\"default\":{}},\"routequery\":{\"type\":\"object\",\"description\":\"Query of the route to navigate before displaying the step tooltip.\",\"default\":{}},\"maskstyle\":{\"type\":\"object\",\"description\":\"Inline CSS style to apply to the user tour mask when displaying this step.\"},\"visibility\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"enum\":[\"mobile\",\"desktop\",\"littlescreen\"]},\"default\":[\"mobile\",\"desktop\",\"littlescreen\"]}},\"required\":[\"type\"]}}}},\"tagrules\":{\"default\":[],\"description\":\"Rules to apply for tags\",\"items\":{\"type\":\"object\",\"properties\":{\"type\":{\"description\":\"Type of rule\",\"enum\":[\"search\",\"size\",\"featured-direction\"],\"type\":\"string\"},\"tags\":{\"description\":\"List of tags to apply the rule\",\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"filteringLogic\":{\"description\":\"Logic to apply when filtering tags (OR or AND)\",\"type\":\"string\",\"enum\":[\"OR\",\"AND\"],\"default\":\"AND\"},\"minzoom\":{\"default\":null,\"description\":\"Min zoom to apply the rule\",\"type\":\"number\"},\"scale\":{\"default\":null,\"description\":\"Scale of pinpoint marker, use it with type 'size'\",\"type\":\"number\"},\"maxzoom\":{\"default\":null,\"description\":\"Max zoom to apply the rule\",\"type\":\"number\"}}},\"type\":\"array\"},\"usetags\":{\"anyOf\":[{\"type\":\"boolean\"},{\"properties\":{\"active\":{\"type\":\"boolean\"},\"filteringLogic\":{\"type\":\"string\",\"default\":\"DEFAULT\",\"enum\":[\"AND\",\"OR\",\"DEFAULT\"]},\"categories\":{\"items\":{\"properties\":{\"name\":{\"type\":\"string\"},\"slug\":{\"type\":\"string\"}},\"required\":[\"name\",\"slug\"],\"type\":\"object\"},\"type\":\"array\"},\"clickable\":{\"type\":\"boolean\"},\"tags\":{\"items\":{\"properties\":{\"category\":{\"type\":[\"boolean\",\"string\"]},\"name\":{\"type\":\"string\"},\"slug\":{\"type\":\"string\"},\"visibility\":{\"type\":\"string\"}},\"required\":[\"name\",\"slug\"],\"type\":\"object\"},\"type\":\"array\"}},\"type\":\"object\"}],\"description\":\"Show tags button in search bar, enable search by tags.\",\"type\":\"object\",\"default\":false},\"webgl\":{\"default\":true,\"description\":\"Force WEBGL livemap's rendering.\",\"type\":\"boolean\"},\"webworkerclustering\":{\"default\":false,\"description\":\"Process superclustering in a webworker\",\"type\":\"boolean\"},\"welcomebuttonlabel\":{\"default\":\"OK !\",\"description\":\"Welcome card button label.\",\"type\":\"string\"},\"zoomcontrol\":{\"default\":true,\"description\":\"Enable zoom control.\",\"type\":\"boolean\"}}"),
|
|
137
138
|
type: "object"
|
|
138
139
|
};
|
|
139
|
-
const isString = (
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
for (let P = 0; P < 3; P++) N[P] = o[P] / M;
|
|
160
|
-
return N;
|
|
161
|
-
}
|
|
162
|
-
static sum(o, M) {
|
|
163
|
-
return [
|
|
164
|
-
o[0] + M[0],
|
|
165
|
-
o[1] + M[1],
|
|
166
|
-
o[2] + M[2]
|
|
167
|
-
];
|
|
168
|
-
}
|
|
169
|
-
static subtract(o, M) {
|
|
170
|
-
return [
|
|
171
|
-
o[0] - M[0],
|
|
172
|
-
o[1] - M[1],
|
|
173
|
-
o[2] - M[2]
|
|
174
|
-
];
|
|
175
|
-
}
|
|
176
|
-
static distance(M, N) {
|
|
177
|
-
return o.norm(o.subtract(M, N));
|
|
178
|
-
}
|
|
179
|
-
static cross(o, M) {
|
|
180
|
-
return [
|
|
181
|
-
o[1] * M[2] - o[2] * M[1],
|
|
182
|
-
o[2] * M[0] - o[0] * M[2],
|
|
183
|
-
o[0] * M[1] - o[1] * M[0]
|
|
184
|
-
];
|
|
185
|
-
}
|
|
186
|
-
static dot(o, M) {
|
|
187
|
-
return o[0] * M[0] + o[1] * M[1] + o[2] * M[2];
|
|
188
|
-
}
|
|
189
|
-
static multiplyScalar(o, M) {
|
|
190
|
-
let N = [
|
|
191
|
-
,
|
|
192
|
-
,
|
|
193
|
-
,
|
|
194
|
-
];
|
|
195
|
-
for (let P = 0; P < 3; P++) N[P] = o[P] * M;
|
|
196
|
-
return N;
|
|
197
|
-
}
|
|
198
|
-
}, _Quaternion = class o {
|
|
199
|
-
static get identity() {
|
|
200
|
-
return [
|
|
201
|
-
1,
|
|
202
|
-
0,
|
|
203
|
-
0,
|
|
204
|
-
0
|
|
205
|
-
];
|
|
206
|
-
}
|
|
207
|
-
static sum(o, M) {
|
|
208
|
-
return [
|
|
209
|
-
o[0] + M[0],
|
|
210
|
-
o[1] + M[1],
|
|
211
|
-
o[2] + M[2],
|
|
212
|
-
o[3] + M[3]
|
|
213
|
-
];
|
|
214
|
-
}
|
|
215
|
-
static rotateMatlab(o, M) {
|
|
216
|
-
let [N, P, F, I] = o, [L, R, z] = M;
|
|
217
|
-
return [
|
|
218
|
-
N * (N * L - F * z + I * R) - F * (N * z - P * R + F * L) + P * (P * L + F * R + I * z) + I * (N * R + P * z - I * L),
|
|
219
|
-
N * (N * R + P * z - I * L) + P * (N * z - P * R + F * L) + F * (P * L + F * R + I * z) - I * (N * L - F * z + I * R),
|
|
220
|
-
N * (N * z - P * R + F * L) - P * (N * R + P * z - I * L) + F * (N * L - F * z + I * R) + I * (P * L + F * R + I * z)
|
|
221
|
-
];
|
|
222
|
-
}
|
|
223
|
-
static rotate(o, M) {
|
|
224
|
-
let [N, P, F, I] = o, L = [
|
|
225
|
-
P,
|
|
226
|
-
F,
|
|
227
|
-
I
|
|
228
|
-
], R = Vector3.cross(L, M);
|
|
229
|
-
R = Vector3.sum(R, R);
|
|
230
|
-
let z = Vector3.sum(M, Vector3.multiplyScalar(R, N));
|
|
231
|
-
return Vector3.sum(z, Vector3.cross(L, R));
|
|
232
|
-
}
|
|
233
|
-
static inverse(o) {
|
|
234
|
-
return [
|
|
235
|
-
-o[0],
|
|
236
|
-
o[1],
|
|
237
|
-
o[2],
|
|
238
|
-
o[3]
|
|
239
|
-
];
|
|
240
|
-
}
|
|
241
|
-
static multiply(...M) {
|
|
242
|
-
if (M.length === 2) {
|
|
243
|
-
let [o, N, P, F] = M[0], [I, L, R, z] = M[1];
|
|
244
|
-
return [
|
|
245
|
-
o * I - N * L - P * R - F * z,
|
|
246
|
-
o * L + I * N + P * z - F * R,
|
|
247
|
-
o * R + I * P + F * L - N * z,
|
|
248
|
-
o * z + I * F + N * R - P * L
|
|
249
|
-
];
|
|
250
|
-
}
|
|
251
|
-
return M.reduce((o, M) => this.multiply(o, M), o.identity);
|
|
252
|
-
}
|
|
253
|
-
static fromAxisAngle(o, M) {
|
|
254
|
-
let N = Math.sin(M / 2);
|
|
255
|
-
return [
|
|
256
|
-
Math.cos(M / 2),
|
|
257
|
-
o[0] * N,
|
|
258
|
-
o[1] * N,
|
|
259
|
-
o[2] * N
|
|
260
|
-
];
|
|
261
|
-
}
|
|
262
|
-
static rotX(o) {
|
|
263
|
-
return this.fromAxisAngle([
|
|
264
|
-
1,
|
|
265
|
-
0,
|
|
266
|
-
0
|
|
267
|
-
], o);
|
|
268
|
-
}
|
|
269
|
-
static rotY(o) {
|
|
270
|
-
return this.fromAxisAngle([
|
|
271
|
-
0,
|
|
272
|
-
1,
|
|
273
|
-
0
|
|
274
|
-
], o);
|
|
275
|
-
}
|
|
276
|
-
static rotZ(o) {
|
|
277
|
-
return this.fromAxisAngle([
|
|
278
|
-
0,
|
|
279
|
-
0,
|
|
280
|
-
1
|
|
281
|
-
], o);
|
|
282
|
-
}
|
|
283
|
-
static fromMatrix3(o) {
|
|
284
|
-
let M = Math.sqrt(1 + o[0][0] + o[1][1] + o[2][2]) / 2;
|
|
285
|
-
return [
|
|
286
|
-
M,
|
|
287
|
-
(o[2][1] - o[1][2]) / (4 * M),
|
|
288
|
-
(o[0][2] - o[2][0]) / (4 * M),
|
|
289
|
-
(o[1][0] - o[0][1]) / (4 * M)
|
|
290
|
-
];
|
|
291
|
-
}
|
|
292
|
-
static fromMatrix3Matlab(o) {
|
|
293
|
-
let M = Math.sqrt(1 + o[0][0] + o[1][1] + o[2][2]) / 2;
|
|
294
|
-
return [
|
|
295
|
-
M,
|
|
296
|
-
(o[1][2] - o[2][1]) / (4 * M),
|
|
297
|
-
(o[2][0] - o[0][2]) / (4 * M),
|
|
298
|
-
(o[0][1] - o[1][0]) / (4 * M)
|
|
299
|
-
];
|
|
300
|
-
}
|
|
301
|
-
static toMatrix3(o) {
|
|
302
|
-
let [M, N, P, F] = o, I = M * N, L = M * P, R = M * F, z = N * N, B = N * P, V = N * F, H = P * P, U = P * F, W = F * F;
|
|
303
|
-
return [
|
|
304
|
-
[
|
|
305
|
-
1 - 2 * (H + W),
|
|
306
|
-
2 * (B - R),
|
|
307
|
-
2 * (V + L)
|
|
308
|
-
],
|
|
309
|
-
[
|
|
310
|
-
2 * (B + R),
|
|
311
|
-
1 - 2 * (z + W),
|
|
312
|
-
2 * (U - I)
|
|
313
|
-
],
|
|
314
|
-
[
|
|
315
|
-
2 * (V - L),
|
|
316
|
-
2 * (U + I),
|
|
317
|
-
1 - 2 * (z + H)
|
|
318
|
-
]
|
|
319
|
-
];
|
|
320
|
-
}
|
|
321
|
-
static wxyz2xyzw(o) {
|
|
322
|
-
return [
|
|
323
|
-
o[1],
|
|
324
|
-
o[2],
|
|
325
|
-
o[3],
|
|
326
|
-
o[0]
|
|
327
|
-
];
|
|
328
|
-
}
|
|
329
|
-
static xyzw2wxyz(o) {
|
|
330
|
-
return [
|
|
331
|
-
o[3],
|
|
332
|
-
o[0],
|
|
333
|
-
o[1],
|
|
334
|
-
o[2]
|
|
335
|
-
];
|
|
336
|
-
}
|
|
337
|
-
static distance(M, N) {
|
|
338
|
-
return Math.acos(Math.min(2 * o.dot(M, N) ** 2 - 1, 1));
|
|
339
|
-
}
|
|
340
|
-
static equals(M, N) {
|
|
341
|
-
return o.distance(M, N) < 1e-8;
|
|
342
|
-
}
|
|
343
|
-
static normalize(o) {
|
|
344
|
-
let M = this.norm(o), N = [
|
|
345
|
-
,
|
|
346
|
-
,
|
|
347
|
-
,
|
|
348
|
-
,
|
|
349
|
-
];
|
|
350
|
-
for (let P = 0; P < 4; P++) N[P] = o[P] / M;
|
|
351
|
-
return N;
|
|
352
|
-
}
|
|
353
|
-
static norm(o) {
|
|
354
|
-
return Math.sqrt(o[0] ** 2 + o[1] ** 2 + o[2] ** 2 + o[3] ** 2);
|
|
355
|
-
}
|
|
356
|
-
static dot(o, M) {
|
|
357
|
-
return o[0] * M[0] + o[1] * M[1] + o[2] * M[2] + o[3] * M[3];
|
|
358
|
-
}
|
|
359
|
-
static getRotationBetweenTwoVectors(M, N) {
|
|
360
|
-
let P = Vector3.normalize(M), F = Vector3.normalize(N), I = Vector3.dot(P, F), L;
|
|
361
|
-
if (I < -.999999) return L = Vector3.cross([
|
|
362
|
-
1,
|
|
363
|
-
0,
|
|
364
|
-
0
|
|
365
|
-
], P), Vector3.norm(L) < 1e-6 && (L = Vector3.cross([
|
|
366
|
-
0,
|
|
367
|
-
1,
|
|
368
|
-
0
|
|
369
|
-
], P)), L = Vector3.normalize(L), o.fromAxisAngle(L, Math.PI);
|
|
370
|
-
if (I > .999999) return o.identity;
|
|
371
|
-
L = Vector3.cross(P, F);
|
|
372
|
-
let R = [
|
|
373
|
-
1 + I,
|
|
374
|
-
L[0],
|
|
375
|
-
L[1],
|
|
376
|
-
L[2]
|
|
377
|
-
];
|
|
378
|
-
return o.normalize(R);
|
|
379
|
-
}
|
|
380
|
-
static slerp(M, N, P) {
|
|
381
|
-
let F = M[1], I = M[2], L = M[3], R = M[0], z = N[1], B = N[2], V = N[3], H = N[0], U, W, G;
|
|
382
|
-
U = F * z + I * B + L * V + R * H, U < 0 && (U = -U, H = -H, z = -z, B = -B, V = -V);
|
|
383
|
-
let K = 1 - U < 1e-6;
|
|
384
|
-
if (K) W = 1 - P, G = P;
|
|
385
|
-
else {
|
|
386
|
-
let o = Math.acos(U), M = Math.sin(o);
|
|
387
|
-
W = Math.sin((1 - P) * o) / M, G = Math.sin(P * o) / M;
|
|
388
|
-
}
|
|
389
|
-
let q = [
|
|
390
|
-
W * R + G * H,
|
|
391
|
-
W * F + G * z,
|
|
392
|
-
W * I + G * B,
|
|
393
|
-
W * L + G * V
|
|
394
|
-
];
|
|
395
|
-
return K && (q = o.normalize(q)), q;
|
|
396
|
-
}
|
|
397
|
-
static toString(o) {
|
|
398
|
-
return `[${o[0].toFixed(2)}, ${o[1].toFixed(2)}, ${o[2].toFixed(2)}, ${o[3].toFixed(2)}]`;
|
|
399
|
-
}
|
|
400
|
-
static fromUnitVectors(M, N) {
|
|
401
|
-
let P = Vector3.dot(M, N) + 1, F, I, L, R;
|
|
402
|
-
P < 2 ** -52 ? (P = 0, Math.abs(M[1]) > Math.abs(M[2]) ? (F = -M[1], I = M[0], L = 0, R = P) : (F = 0, I = -M[2], L = M[1], R = P)) : (F = M[1] * N[2] - M[2] * N[1], I = M[2] * N[0] - M[0] * N[2], L = M[0] * N[1] - M[1] * N[0], R = P);
|
|
403
|
-
let z = [
|
|
404
|
-
R,
|
|
405
|
-
F,
|
|
406
|
-
I,
|
|
407
|
-
L
|
|
408
|
-
];
|
|
409
|
-
return o.normalize(z);
|
|
410
|
-
}
|
|
411
|
-
};
|
|
412
|
-
__publicField$1(_Quaternion, "ROTX_PI2", _Quaternion.rotX(Math.PI / 2)), __publicField$1(_Quaternion, "ROTX_PI", _Quaternion.rotX(Math.PI)), __publicField$1(_Quaternion, "ROTX_MPI2", _Quaternion.rotX(-Math.PI / 2)), __publicField$1(_Quaternion, "ROTY_PI2", _Quaternion.rotY(Math.PI / 2)), __publicField$1(_Quaternion, "ROTY_PI", _Quaternion.rotY(Math.PI)), __publicField$1(_Quaternion, "ROTY_MPI2", _Quaternion.rotY(-Math.PI / 2)), __publicField$1(_Quaternion, "ROTZ_PI2", _Quaternion.rotZ(Math.PI / 2)), __publicField$1(_Quaternion, "ROTZ_PI", _Quaternion.rotZ(Math.PI)), __publicField$1(_Quaternion, "ROTZ_MPI2", _Quaternion.rotZ(-Math.PI / 2));
|
|
413
|
-
var Quaternion = _Quaternion;
|
|
414
|
-
function deg2rad(o) {
|
|
415
|
-
return o * (Math.PI / 180);
|
|
416
|
-
}
|
|
417
|
-
function rad2deg(o) {
|
|
418
|
-
return o * 180 / Math.PI;
|
|
419
|
-
}
|
|
420
|
-
function wrap(o, M, N) {
|
|
421
|
-
let P = N - M, F = ((o - M) % P + P) % P + M;
|
|
422
|
-
return F === M ? N : F;
|
|
423
|
-
}
|
|
424
|
-
var __defProp = Object.defineProperty, __defNormalProp = (o, M, N) => M in o ? __defProp(o, M, {
|
|
425
|
-
enumerable: !0,
|
|
426
|
-
configurable: !0,
|
|
427
|
-
writable: !0,
|
|
428
|
-
value: N
|
|
429
|
-
}) : o[M] = N, __publicField = (o, M, N) => (__defNormalProp(o, typeof M == "symbol" ? M : M + "", N), N), R_MAJOR = 6378137, R_MINOR = 6356752.3142, EPS_DEG_MM = 1e-8, EPS_MM = .001, ELLIPSOID_FLATNESS = (R_MAJOR - R_MINOR) / R_MAJOR, ECCENTRICITY = Math.sqrt(ELLIPSOID_FLATNESS * (2 - ELLIPSOID_FLATNESS));
|
|
430
|
-
ECCENTRICITY * ECCENTRICITY;
|
|
431
|
-
var R_MAJOR_2 = R_MAJOR * R_MAJOR;
|
|
432
|
-
R_MAJOR_2 * R_MAJOR_2;
|
|
433
|
-
var R_MINOR_2 = R_MINOR * R_MINOR;
|
|
434
|
-
R_MINOR_2 * R_MINOR_2, R_MAJOR * 2 * Math.PI;
|
|
435
|
-
var _Level = class o {
|
|
436
|
-
static checkType(o) {
|
|
437
|
-
if (o !== null && !(typeof o == "number" && !isNaN(o))) {
|
|
438
|
-
if (Array.isArray(o) && o.length === 2) {
|
|
439
|
-
let [M, N] = o;
|
|
440
|
-
if (typeof M == "number" && !isNaN(M) && typeof N == "number" && !isNaN(N)) {
|
|
441
|
-
if (M > N || M === N) throw Error(`Invalid level range: [${M}, ${N}]`);
|
|
442
|
-
return;
|
|
443
|
-
}
|
|
444
|
-
}
|
|
445
|
-
throw Error(`Unknown level format: ${o}`);
|
|
446
|
-
}
|
|
447
|
-
}
|
|
448
|
-
static isRange(M) {
|
|
449
|
-
return o.VERIFY_TYPING && o.checkType(M), Array.isArray(M);
|
|
450
|
-
}
|
|
451
|
-
static clone(M) {
|
|
452
|
-
return o.VERIFY_TYPING && o.checkType(M), M === null ? null : typeof M == "number" ? M : [M[0], M[1]];
|
|
453
|
-
}
|
|
454
|
-
static fromString(M) {
|
|
455
|
-
if (M === null) return null;
|
|
456
|
-
if (typeof M != "string" || !M.length) throw Error(`argument must be a non empty string, got ${typeof M}`);
|
|
457
|
-
if (!isNaN(Number(M))) return parseFloat(M);
|
|
458
|
-
let N = M.split(";");
|
|
459
|
-
if (N.length > 1) {
|
|
460
|
-
let M = N.map((o) => Number(o)), P = Math.min(...M), F = Math.max(...M);
|
|
461
|
-
return o.checkType([P, F]), [P, F];
|
|
462
|
-
} else {
|
|
463
|
-
let N = M.substring(1).indexOf("-") + 1;
|
|
464
|
-
if (N > 0) {
|
|
465
|
-
let P = Number(M.substring(0, N)), F = Number(M.substring(N + 1));
|
|
466
|
-
return o.checkType([P, F]), [P, F];
|
|
467
|
-
}
|
|
468
|
-
}
|
|
469
|
-
throw Error(`Cannot parse following level: ${M}`);
|
|
470
|
-
}
|
|
471
|
-
static contains(M, N) {
|
|
472
|
-
return o.VERIFY_TYPING && (o.checkType(M), o.checkType(N)), M === N ? !0 : Array.isArray(M) ? Array.isArray(N) ? M[0] <= N[0] && M[1] >= N[1] : N === null ? !1 : M[0] <= N && M[1] >= N : M === null || N === null ? !1 : M <= N[0] && M >= N[1];
|
|
473
|
-
}
|
|
474
|
-
static intersection(M, N) {
|
|
475
|
-
if (o.VERIFY_TYPING && (o.checkType(M), o.checkType(N)), M === null || N === null) return null;
|
|
476
|
-
if (o.equals(M, N)) return o.clone(M);
|
|
477
|
-
if (typeof M == "number" && typeof N == "number") return M === N ? M : null;
|
|
478
|
-
if (Array.isArray(M) && !Array.isArray(N)) return o.contains(M, N) ? N : null;
|
|
479
|
-
if (!Array.isArray(M) && Array.isArray(N)) return o.contains(N, M) ? M : null;
|
|
480
|
-
let P = Math.max(M[0], N[0]), F = Math.min(M[1], N[1]);
|
|
481
|
-
return F === P ? F : F < P ? null : [P, F];
|
|
482
|
-
}
|
|
483
|
-
static intersect(M, N) {
|
|
484
|
-
return o.VERIFY_TYPING && (o.checkType(M), o.checkType(N)), M === null && N === null ? !0 : o.intersection(M, N) !== null;
|
|
485
|
-
}
|
|
486
|
-
static union(M, N) {
|
|
487
|
-
if (o.VERIFY_TYPING && (o.checkType(M), o.checkType(N)), M === N) return o.clone(M);
|
|
488
|
-
if (N === null || M === null) return null;
|
|
489
|
-
let P, F;
|
|
490
|
-
return !Array.isArray(M) && !Array.isArray(N) ? (P = Math.min(M, N), F = Math.max(M, N)) : Array.isArray(M) && !Array.isArray(N) ? (P = Math.min(M[0], N), F = Math.max(M[1], N)) : !Array.isArray(M) && Array.isArray(N) ? (P = Math.min(N[0], M), F = Math.max(N[1], M)) : (P = Math.min(M[0], N[0]), F = Math.max(M[1], N[1])), P === F ? P : [P, F];
|
|
491
|
-
}
|
|
492
|
-
static multiplyBy(M, N) {
|
|
493
|
-
return o.VERIFY_TYPING && o.checkType(M), M === null ? null : Array.isArray(M) ? [M[0] * N, M[1] * N] : M * N;
|
|
494
|
-
}
|
|
495
|
-
static toString(M) {
|
|
496
|
-
return o.VERIFY_TYPING && o.checkType(M), M === null ? null : Array.isArray(M) ? M[0] + ";" + M[1] : String(M);
|
|
497
|
-
}
|
|
498
|
-
static equals(M, N) {
|
|
499
|
-
return o.VERIFY_TYPING && (o.checkType(M), o.checkType(N)), M === N ? !0 : Array.isArray(M) && Array.isArray(N) ? M[0] === N[0] && M[1] === N[1] : !1;
|
|
500
|
-
}
|
|
501
|
-
static diff(M, N) {
|
|
502
|
-
return o.VERIFY_TYPING && (o.checkType(M), o.checkType(N)), M === null || N === null ? null : !Array.isArray(M) && !Array.isArray(N) ? N - M : Array.isArray(M) && !Array.isArray(N) ? M[0] === N ? N - M[1] : M[1] === N ? N - M[0] : null : Array.isArray(N) && !Array.isArray(M) ? M === N[0] ? N[1] - M : M === N[1] ? N[0] - M : null : o.equals(M, N) ? 0 : null;
|
|
503
|
-
}
|
|
504
|
-
};
|
|
505
|
-
__publicField(_Level, "VERIFY_TYPING", !1);
|
|
506
|
-
var Level = _Level, Coordinates = class o {
|
|
507
|
-
constructor(o, M, N = null, P = null) {
|
|
508
|
-
__publicField(this, "_lat"), __publicField(this, "_lng"), __publicField(this, "_alt", null), __publicField(this, "_level", null), __publicField(this, "_heightFromFloor", null), __publicField(this, "_heightFromGround", null), __publicField(this, "_ecef"), __publicField(this, "autoWrap", !0), this.lat = o, this.lng = M, this.alt = N, this.level = P, this._ecef = null;
|
|
509
|
-
}
|
|
510
|
-
get lat() {
|
|
511
|
-
return this._lat;
|
|
512
|
-
}
|
|
513
|
-
set lat(o) {
|
|
514
|
-
if (Math.abs(o) <= 90) this._lat = o;
|
|
515
|
-
else throw Error(`lat argument is not in [-90; 90], value is ${o}`);
|
|
516
|
-
this._ecef = null;
|
|
517
|
-
}
|
|
518
|
-
get latitude() {
|
|
519
|
-
return this._lat;
|
|
520
|
-
}
|
|
521
|
-
set latitude(o) {
|
|
522
|
-
throw Error("Please use Coordinates#lat setter instead of Coordinate#latitude");
|
|
523
|
-
}
|
|
524
|
-
get lng() {
|
|
525
|
-
return this._lng;
|
|
526
|
-
}
|
|
527
|
-
set lng(o) {
|
|
528
|
-
this._lng = o, this.autoWrap && this.wrap(), this._ecef = null;
|
|
529
|
-
}
|
|
530
|
-
get longitude() {
|
|
531
|
-
return this._lng;
|
|
532
|
-
}
|
|
533
|
-
set longitude(o) {
|
|
534
|
-
throw Error("Please use Coordinates#lng setter instead of Coordinate#longitude");
|
|
535
|
-
}
|
|
536
|
-
get alt() {
|
|
537
|
-
return this._alt;
|
|
538
|
-
}
|
|
539
|
-
set alt(o) {
|
|
540
|
-
this._alt = o, this._ecef = null;
|
|
541
|
-
}
|
|
542
|
-
get level() {
|
|
543
|
-
return this._level;
|
|
544
|
-
}
|
|
545
|
-
set level(o) {
|
|
546
|
-
Level.checkType(o), this._level = o;
|
|
547
|
-
}
|
|
548
|
-
get heightFromFloor() {
|
|
549
|
-
return this._heightFromFloor;
|
|
550
|
-
}
|
|
551
|
-
set heightFromFloor(o) {
|
|
552
|
-
this._heightFromFloor = o;
|
|
553
|
-
}
|
|
554
|
-
get heightFromGround() {
|
|
555
|
-
return this._heightFromGround;
|
|
556
|
-
}
|
|
557
|
-
set heightFromGround(o) {
|
|
558
|
-
this._heightFromGround = o;
|
|
559
|
-
}
|
|
560
|
-
clone() {
|
|
561
|
-
let M = new o(this.lat, this.lng, this.alt);
|
|
562
|
-
return this.level !== null && (M.level = Level.clone(this.level)), M;
|
|
563
|
-
}
|
|
564
|
-
wrap() {
|
|
565
|
-
(this._lng <= -180 || this._lng > 180) && (this._lng = wrap(this._lng, -180, 180));
|
|
566
|
-
}
|
|
567
|
-
static equals(o, M, N = EPS_DEG_MM, P = EPS_MM) {
|
|
568
|
-
return this.equalsWithoutLevel(o, M, N, P) ? o === null || M === null ? !0 : Level.equals(o.level, M.level) : !1;
|
|
569
|
-
}
|
|
570
|
-
equals(M) {
|
|
571
|
-
return o.equals(this, M);
|
|
572
|
-
}
|
|
573
|
-
static equalsWithoutLevel(M, N, P = EPS_DEG_MM, F = EPS_MM) {
|
|
574
|
-
return M === null && M === N ? !0 : !(M instanceof o) || !(N instanceof o) ? !1 : Math.abs(N.lat - M.lat) < P && Math.abs(N.lng - M.lng) < P && (M.alt === N.alt || M.alt !== null && N.alt !== null && Math.abs(N.alt - M.alt) < F);
|
|
575
|
-
}
|
|
576
|
-
equalsWithoutLevel(M, N = EPS_DEG_MM, P = EPS_MM) {
|
|
577
|
-
return o.equalsWithoutLevel(this, M, N, P);
|
|
578
|
-
}
|
|
579
|
-
destinationPoint(o, M, N = null) {
|
|
580
|
-
let P = this.clone();
|
|
581
|
-
return P.move(o, M, N), P;
|
|
582
|
-
}
|
|
583
|
-
move(o, M, N = null) {
|
|
584
|
-
let P = o / R_MAJOR, F = Math.cos(P), I = Math.sin(P), L = deg2rad(this.lat), R = deg2rad(this.lng), z = Math.asin(Math.sin(L) * F + Math.cos(L) * I * Math.cos(M)), B = R + Math.atan2(Math.sin(M) * I * Math.cos(L), F - Math.sin(L) * Math.sin(z));
|
|
585
|
-
if (this.lat = rad2deg(z), this.lng = rad2deg(B), N !== null) {
|
|
586
|
-
if (this.alt === null) throw Error("Point altitude is not defined");
|
|
587
|
-
this.alt += N;
|
|
588
|
-
}
|
|
589
|
-
return this;
|
|
590
|
-
}
|
|
591
|
-
distanceTo(o) {
|
|
592
|
-
let M = this.lat, N = this.lng, P = o.lat, F = o.lng, I = deg2rad(P - M), L = deg2rad(F - N), R = Math.sin(L / 2), z = Math.sin(I / 2), B = deg2rad(M), V = Math.cos(B), H = deg2rad(P), U = Math.cos(H), W = z * z + V * U * R * R, G = Math.sqrt(W), q = Math.sqrt(1 - W);
|
|
593
|
-
return R_MAJOR * (2 * Math.atan2(G, q));
|
|
594
|
-
}
|
|
595
|
-
static distanceBetween(o, M) {
|
|
596
|
-
return o.distanceTo(M);
|
|
597
|
-
}
|
|
598
|
-
bearingTo(o) {
|
|
599
|
-
let M = deg2rad(this.lat), N = deg2rad(o.lat), P = deg2rad(o.lng - this.lng);
|
|
600
|
-
return Math.atan2(Math.sin(P) * Math.cos(N), Math.cos(M) * Math.sin(N) - Math.sin(M) * Math.cos(N) * Math.cos(P));
|
|
601
|
-
}
|
|
602
|
-
static bearingTo(o, M) {
|
|
603
|
-
return o.bearingTo(M);
|
|
604
|
-
}
|
|
605
|
-
get enuToEcefRotation() {
|
|
606
|
-
let o = Quaternion.fromAxisAngle([
|
|
607
|
-
0,
|
|
608
|
-
0,
|
|
609
|
-
1
|
|
610
|
-
], Math.PI / 2 + deg2rad(this.lng)), M = Quaternion.fromAxisAngle([
|
|
611
|
-
1,
|
|
612
|
-
0,
|
|
613
|
-
0
|
|
614
|
-
], Math.PI / 2 - deg2rad(this.lat));
|
|
615
|
-
return Quaternion.multiply(o, M);
|
|
616
|
-
}
|
|
617
|
-
get ecefToEnuRotation() {
|
|
618
|
-
let o = Quaternion.fromAxisAngle([
|
|
619
|
-
1,
|
|
620
|
-
0,
|
|
621
|
-
0
|
|
622
|
-
], deg2rad(this.lat) - Math.PI / 2), M = Quaternion.fromAxisAngle([
|
|
623
|
-
0,
|
|
624
|
-
0,
|
|
625
|
-
1
|
|
626
|
-
], -deg2rad(this.lng) - Math.PI / 2);
|
|
627
|
-
return Quaternion.multiply(o, M);
|
|
628
|
-
}
|
|
629
|
-
get ecef() {
|
|
630
|
-
if (!this._ecef) {
|
|
631
|
-
let o = deg2rad(this.lat), M = deg2rad(this.lng), N = this.alt || 0;
|
|
632
|
-
this._ecef = [
|
|
633
|
-
(R_MAJOR + N) * Math.cos(o) * Math.cos(M),
|
|
634
|
-
(R_MAJOR + N) * Math.cos(o) * Math.sin(M),
|
|
635
|
-
(R_MAJOR + N) * Math.sin(o)
|
|
636
|
-
];
|
|
637
|
-
}
|
|
638
|
-
return this._ecef;
|
|
639
|
-
}
|
|
640
|
-
static fromECEF(M) {
|
|
641
|
-
let N = M[0], P = M[1], F = M[2], I = Math.sqrt(N ** 2 + P ** 2), L = Math.atan2(P, N), R = Math.atan2(F, I), z = I / Math.cos(R) - R_MAJOR;
|
|
642
|
-
L %= 2 * Math.PI;
|
|
643
|
-
let B = new o(rad2deg(R), rad2deg(L), z);
|
|
644
|
-
return B._ecef = M, B;
|
|
645
|
-
}
|
|
646
|
-
getSegmentProjection(M, N) {
|
|
647
|
-
let P = Vector3.normalize(M.ecef), F = Vector3.normalize(N.ecef), I = Vector3.normalize(this.ecef), L = Vector3.cross(P, F);
|
|
648
|
-
if (Vector3.norm(L) === 0) return null;
|
|
649
|
-
let R = Vector3.cross(I, L), z = Vector3.normalize(Vector3.cross(L, R)), B = Vector3.multiplyScalar(z, R_MAJOR), V = o.fromECEF(B), H;
|
|
650
|
-
M.alt !== null && N.alt !== null && (H = (M.alt + N.alt) / 2);
|
|
651
|
-
let W = new o(V.lat, V.lng, H, Level.union(M.level, N.level));
|
|
652
|
-
return Math.abs(M.distanceTo(N) - M.distanceTo(W) - N.distanceTo(W)) > EPS_MM ? null : W;
|
|
653
|
-
}
|
|
654
|
-
toString() {
|
|
655
|
-
let o = "[" + this._lat.toFixed(7) + ", " + this._lng.toFixed(7);
|
|
656
|
-
return this._alt !== null && (o += ", " + this._alt.toFixed(2)), this._level !== null && (o += ", [" + Level.toString(this._level) + "]"), o += "]", o;
|
|
657
|
-
}
|
|
658
|
-
toJson() {
|
|
659
|
-
return {
|
|
660
|
-
lat: Number(this.lat.toFixed(8)),
|
|
661
|
-
lng: Number(this.lng.toFixed(8)),
|
|
662
|
-
...this.alt !== null && { alt: Number(this.alt.toFixed(3)) },
|
|
663
|
-
...this.level !== null && { level: this.level }
|
|
664
|
-
};
|
|
665
|
-
}
|
|
666
|
-
static fromJson(M) {
|
|
667
|
-
return new o(M.lat, M.lng, M.alt, M.level);
|
|
668
|
-
}
|
|
669
|
-
toCompressedJson() {
|
|
670
|
-
return this.level === null ? [Number(this.lat.toFixed(8)), Number(this.lng.toFixed(8))] : [
|
|
671
|
-
Number(this.lat.toFixed(8)),
|
|
672
|
-
Number(this.lng.toFixed(8)),
|
|
673
|
-
this.level
|
|
674
|
-
];
|
|
675
|
-
}
|
|
676
|
-
static fromCompressedJson(M) {
|
|
677
|
-
let N = new o(M[0], M[1]);
|
|
678
|
-
return M.length > 2 && (N.level = M[2]), N;
|
|
679
|
-
}
|
|
680
|
-
}, BoundingBox = class o {
|
|
681
|
-
constructor(o, M) {
|
|
682
|
-
if (__publicField(this, "northEast"), __publicField(this, "southWest"), this.northEast = o, this.southWest = M, this.northEast && this.southWest && this.getNorth() < this.getSouth()) throw Error("Incorrect bounding box");
|
|
683
|
-
}
|
|
684
|
-
get center() {
|
|
685
|
-
return new Coordinates((this.southWest.lat + this.northEast.lat) / 2, (this.northEast.lng + this.southWest.lng) / 2);
|
|
686
|
-
}
|
|
687
|
-
contains(o) {
|
|
688
|
-
return o.lat <= this.northEast.lat && o.lat >= this.southWest.lat && o.lng <= this.northEast.lng && o.lng >= this.southWest.lng;
|
|
689
|
-
}
|
|
690
|
-
extend(M) {
|
|
691
|
-
let N = this.southWest, P = this.northEast, F, I;
|
|
692
|
-
if (M instanceof Coordinates) F = M, I = M;
|
|
693
|
-
else if (M instanceof o) F = M.southWest, I = M.northEast;
|
|
694
|
-
else throw Error("Unknown parameter");
|
|
695
|
-
return this.southWest = new Coordinates(Math.min(F.lat, N.lat), Math.min(F.lng, N.lng)), this.northEast = new Coordinates(Math.max(I.lat, P.lat), Math.max(I.lng, P.lng)), this;
|
|
696
|
-
}
|
|
697
|
-
extendsWithMeasure(o) {
|
|
698
|
-
if (typeof o != "number") throw Error("measure is not a number");
|
|
699
|
-
return this.northEast = this.northEast.destinationPoint(o, 0).move(o, Math.PI / 2), this.southWest = this.southWest.clone().destinationPoint(o, -Math.PI / 2).destinationPoint(o, Math.PI), this;
|
|
700
|
-
}
|
|
701
|
-
pad(o) {
|
|
702
|
-
let M = this.southWest, N = this.northEast, P = Math.abs(M.lat - N.lat) * o, F = Math.abs(M.lng - N.lng) * o;
|
|
703
|
-
return this.southWest = new Coordinates(M.lat - P, M.lng - F), this.northEast = new Coordinates(N.lat + P, N.lng + F), this;
|
|
704
|
-
}
|
|
705
|
-
getSouthWest() {
|
|
706
|
-
return this.southWest;
|
|
707
|
-
}
|
|
708
|
-
getNorthEast() {
|
|
709
|
-
return this.northEast;
|
|
710
|
-
}
|
|
711
|
-
getNorthWest() {
|
|
712
|
-
return new Coordinates(this.getNorth(), this.getWest());
|
|
713
|
-
}
|
|
714
|
-
getSouthEast() {
|
|
715
|
-
return new Coordinates(this.getSouth(), this.getEast());
|
|
716
|
-
}
|
|
717
|
-
getWest() {
|
|
718
|
-
return this.southWest.lng;
|
|
719
|
-
}
|
|
720
|
-
getSouth() {
|
|
721
|
-
return this.southWest.lat;
|
|
722
|
-
}
|
|
723
|
-
getEast() {
|
|
724
|
-
return this.northEast.lng;
|
|
725
|
-
}
|
|
726
|
-
getNorth() {
|
|
727
|
-
return this.northEast.lat;
|
|
728
|
-
}
|
|
729
|
-
static equals(o, M) {
|
|
730
|
-
return Coordinates.equals(o.northEast, M.northEast) && Coordinates.equals(o.southWest, M.southWest);
|
|
731
|
-
}
|
|
732
|
-
equals(M) {
|
|
733
|
-
return o.equals(this, M);
|
|
734
|
-
}
|
|
735
|
-
static fromArray(M) {
|
|
736
|
-
return new o(new Coordinates(M[3], M[2]), new Coordinates(M[1], M[0]));
|
|
737
|
-
}
|
|
738
|
-
static fromCoordinates(M) {
|
|
739
|
-
return M.length === 0 ? null : M.reduce((o, M) => o.extend(M), new o(M[0], M[0]));
|
|
740
|
-
}
|
|
741
|
-
toArray() {
|
|
742
|
-
return [
|
|
743
|
-
this.getWest(),
|
|
744
|
-
this.getSouth(),
|
|
745
|
-
this.getEast(),
|
|
746
|
-
this.getNorth()
|
|
747
|
-
];
|
|
748
|
-
}
|
|
749
|
-
};
|
|
750
|
-
const defaultBounds = new BoundingBox(new Coordinates(85, 170), new Coordinates(-85, -170)), correctBounds = (o) => {
|
|
751
|
-
let M = o.getSouthWest(), N = o.getNorthEast(), P = M.lat, F = M.lng, I = N.lat, L = N.lng;
|
|
752
|
-
F > L && (F = -(180 - F + 180));
|
|
753
|
-
let R = new Coordinates(0, 0);
|
|
754
|
-
R.autoWrap = !1, R.lat = I, R.lng = L;
|
|
755
|
-
let z = new Coordinates(0, 0);
|
|
756
|
-
return z.autoWrap = !1, z.lat = P, z.lng = F, new BoundingBox(R, z);
|
|
757
|
-
}, deltaToBounds = (o) => {
|
|
758
|
-
if (!o) return defaultBounds;
|
|
759
|
-
let M = new Coordinates(Number(o.latitude) - Number(o.latitude_delta), Number(o.longitude) - Number(o.longitude_delta));
|
|
760
|
-
return correctBounds(new BoundingBox(new Coordinates(Number(o.latitude) + Number(o.latitude_delta), Number(o.longitude) + Number(o.longitude_delta)), M));
|
|
761
|
-
}, latLngLikeToCoordinates = (o) => {
|
|
762
|
-
if (o instanceof Coordinates) return o;
|
|
763
|
-
if (Array.isArray(o)) {
|
|
764
|
-
let [M, N, P] = o;
|
|
765
|
-
return new Coordinates(M, N, null, P);
|
|
766
|
-
}
|
|
767
|
-
let M = "lat" in o ? o.lat : o.latitude, N = "lng" in o ? o.lng : o.longitude, P = "level" in o ? o.level : null, F = "alt" in o ? o.alt : null;
|
|
768
|
-
if ("altitude" in o && (F = o.altitude), !isNumber(M) || !isNumber(N)) throw Error("Cannot parse lat/lng in" + JSON.stringify(o));
|
|
769
|
-
return new Coordinates(M, N, isNumber(F) ? F : null, isNumber(P) ? P : null);
|
|
140
|
+
const isString = (e) => typeof e == "string", isNumber = (e) => typeof e == "number", isDefinedStrict = (e) => e != null, isObjectType = (e) => typeof e == "object" && !!e, defaultBounds = new BoundingBox(new Coordinates(85, 170), new Coordinates(-85, -170)), correctBounds = (g) => {
|
|
141
|
+
let _ = g.getSouthWest(), v = g.getNorthEast(), y = _.lat, b = _.lng, x = v.lat, S = v.lng;
|
|
142
|
+
b > S && (b = -(180 - b + 180));
|
|
143
|
+
let C = new Coordinates(0, 0);
|
|
144
|
+
C.autoWrap = !1, C.lat = x, C.lng = S;
|
|
145
|
+
let w = new Coordinates(0, 0);
|
|
146
|
+
return w.autoWrap = !1, w.lat = y, w.lng = b, new BoundingBox(C, w);
|
|
147
|
+
}, deltaToBounds = (g) => {
|
|
148
|
+
if (!g) return defaultBounds;
|
|
149
|
+
let _ = new Coordinates(Number(g.latitude) - Number(g.latitude_delta), Number(g.longitude) - Number(g.longitude_delta));
|
|
150
|
+
return correctBounds(new BoundingBox(new Coordinates(Number(g.latitude) + Number(g.latitude_delta), Number(g.longitude) + Number(g.longitude_delta)), _));
|
|
151
|
+
}, latLngLikeToCoordinates = (e) => {
|
|
152
|
+
if (e instanceof Coordinates) return e;
|
|
153
|
+
if (Array.isArray(e)) {
|
|
154
|
+
let [g, _, v] = e;
|
|
155
|
+
return new Coordinates(g, _, null, v);
|
|
156
|
+
}
|
|
157
|
+
let g = "lat" in e ? e.lat : e.latitude, _ = "lng" in e ? e.lng : e.longitude, v = "level" in e ? e.level : null, y = "alt" in e ? e.alt : null;
|
|
158
|
+
if ("altitude" in e && (y = e.altitude), !isNumber(g) || !isNumber(_)) throw Error("Cannot parse lat/lng in" + JSON.stringify(e));
|
|
159
|
+
return new Coordinates(g, _, isNumber(y) ? y : null, isNumber(v) ? v : null);
|
|
770
160
|
};
|
|
771
|
-
var getArray = function(
|
|
772
|
-
let
|
|
773
|
-
return isString(
|
|
774
|
-
}, getBoolean = function(
|
|
775
|
-
return isDefinedStrict(
|
|
776
|
-
}, getInteger = function(
|
|
777
|
-
let
|
|
778
|
-
return isNaN(
|
|
779
|
-
}, getFloat = function(
|
|
780
|
-
let
|
|
781
|
-
return isNaN(
|
|
782
|
-
}, getObject = function(
|
|
783
|
-
let
|
|
784
|
-
return isDefinedStrict(
|
|
161
|
+
var getArray = function(e, h) {
|
|
162
|
+
let g = e;
|
|
163
|
+
return isString(g) && (g = parseJSONSafely(g)), Array.isArray(g) ? g : h;
|
|
164
|
+
}, getBoolean = function(e, h) {
|
|
165
|
+
return isDefinedStrict(e) ? isString(e) && e.toLowerCase() === "true" : h;
|
|
166
|
+
}, getInteger = function(e, h) {
|
|
167
|
+
let g = Number(e);
|
|
168
|
+
return isNaN(g) ? h : g;
|
|
169
|
+
}, getFloat = function(e, h) {
|
|
170
|
+
let g = Number(e);
|
|
171
|
+
return isNaN(g) ? h : g;
|
|
172
|
+
}, getObject = function(e) {
|
|
173
|
+
let h = livemap_snippet_default.properties[e], g = SnippetParser.snippet[e];
|
|
174
|
+
return isDefinedStrict(g) ? (isString(g) && (g = parseJSONSafely(g)), isObjectType(g) || (g = {}), g = SnippetParser.fillEmptyByDefault(g, "properties" in h ? h.properties : {}), g) : h.default;
|
|
785
175
|
};
|
|
786
|
-
function getMaxBounds(
|
|
787
|
-
let
|
|
788
|
-
return
|
|
176
|
+
function getMaxBounds(h, g) {
|
|
177
|
+
let _ = parseJSONSafely(h);
|
|
178
|
+
return _ ? new BoundingBox(latLngLikeToCoordinates(_._northEast), latLngLikeToCoordinates(_._southWest)) : g;
|
|
789
179
|
}
|
|
790
|
-
var parseJSONSafely = function(
|
|
791
|
-
if (!isString(
|
|
180
|
+
var parseJSONSafely = function(e) {
|
|
181
|
+
if (!isString(e) || e === null) return e;
|
|
792
182
|
try {
|
|
793
183
|
try {
|
|
794
|
-
return JSON.parse(decodeURI(
|
|
184
|
+
return JSON.parse(decodeURI(e));
|
|
795
185
|
} catch {
|
|
796
|
-
return JSON.parse(decodeURIComponent(
|
|
186
|
+
return JSON.parse(decodeURIComponent(e));
|
|
797
187
|
}
|
|
798
188
|
} catch {
|
|
799
189
|
return null;
|
|
800
190
|
}
|
|
801
|
-
}, getString = function(
|
|
802
|
-
return
|
|
803
|
-
}, SnippetParser = class
|
|
191
|
+
}, getString = function(e, h) {
|
|
192
|
+
return e == null || typeof e != "string" ? h : e;
|
|
193
|
+
}, SnippetParser = class e {
|
|
804
194
|
static snippet = {};
|
|
805
195
|
static mapObject;
|
|
806
|
-
static getProperty(
|
|
807
|
-
let
|
|
808
|
-
return
|
|
809
|
-
}
|
|
810
|
-
static fillEmptyByDefault(
|
|
811
|
-
let
|
|
812
|
-
return
|
|
813
|
-
let
|
|
814
|
-
|
|
815
|
-
}),
|
|
816
|
-
}
|
|
817
|
-
static parse(
|
|
818
|
-
return
|
|
819
|
-
arNavigationData:
|
|
820
|
-
aroundme: !!
|
|
821
|
-
deepLinkingEnabled:
|
|
822
|
-
dragging:
|
|
823
|
-
emmid: Number(
|
|
824
|
-
handleBearing:
|
|
825
|
-
initialBounds: deltaToBounds(
|
|
826
|
-
initialBearing:
|
|
827
|
-
limit: Number(
|
|
828
|
-
locked:
|
|
829
|
-
maxBounds: getMaxBounds(
|
|
830
|
-
maxZoom:
|
|
831
|
-
minZoom:
|
|
832
|
-
name:
|
|
833
|
-
pitchEnabled:
|
|
834
|
-
pitchStart:
|
|
835
|
-
providersEnabled:
|
|
836
|
-
routingMode:
|
|
837
|
-
routingType:
|
|
838
|
-
routingUrl:
|
|
839
|
-
scrollWheelZoom:
|
|
840
|
-
tilesStyle:
|
|
196
|
+
static getProperty(h) {
|
|
197
|
+
let g = livemap_snippet_default.properties[h];
|
|
198
|
+
return g.type === "array" ? getArray(e.snippet[h], g.default) : g.type === "boolean" ? getBoolean(e.snippet[h], g.default) : g.type === "integer" ? getInteger(e.snippet[h], g.default) : g.type === "number" ? getFloat(e.snippet[h], g.default) : g.type === "string" ? getString(e.snippet[h], g.default) : g.type === "object" ? getObject(h) : null;
|
|
199
|
+
}
|
|
200
|
+
static fillEmptyByDefault(h, g) {
|
|
201
|
+
let _ = { ...h };
|
|
202
|
+
return g && Object.keys(g).forEach((h) => {
|
|
203
|
+
let v = g[h];
|
|
204
|
+
_.hasOwnProperty(h) ? v.type === "object" ? _[h] = e.fillEmptyByDefault(_[h], v.properties) : v.type === "array" && v.hasOwnProperty("items") && v.items.hasOwnProperty("properties") && (_[h] = _[h].map((h) => e.fillEmptyByDefault(h, v.items.properties))) : v.hasOwnProperty("default") ? _[h] = v.default : v.type === "object" && (_[h] = e.fillEmptyByDefault(_[h], v.properties));
|
|
205
|
+
}), _;
|
|
206
|
+
}
|
|
207
|
+
static parse(h) {
|
|
208
|
+
return e.mapObject = h, e.snippet = h.snippet, {
|
|
209
|
+
arNavigationData: e.getProperty("arnavigationdata"),
|
|
210
|
+
aroundme: !!e.getProperty("aroundme"),
|
|
211
|
+
deepLinkingEnabled: e.getProperty("deeplinkingenabled"),
|
|
212
|
+
dragging: e.getProperty("dragging"),
|
|
213
|
+
emmid: Number(e.mapObject.id),
|
|
214
|
+
handleBearing: e.getProperty("handlebearing"),
|
|
215
|
+
initialBounds: deltaToBounds(h),
|
|
216
|
+
initialBearing: e.getProperty("initialbearing"),
|
|
217
|
+
limit: Number(e.mapObject.count),
|
|
218
|
+
locked: e.getProperty("locked"),
|
|
219
|
+
maxBounds: getMaxBounds(e.snippet.maxbounds, defaultBounds),
|
|
220
|
+
maxZoom: e.getProperty("maxzoom"),
|
|
221
|
+
minZoom: e.getProperty("minzoom"),
|
|
222
|
+
name: e.mapObject.name,
|
|
223
|
+
pitchEnabled: e.getProperty("pitchenabled"),
|
|
224
|
+
pitchStart: e.getProperty("pitchstart"),
|
|
225
|
+
providersEnabled: e.getProperty("providersenabled"),
|
|
226
|
+
routingMode: e.getProperty("routingmode"),
|
|
227
|
+
routingType: e.getProperty("routingtype"),
|
|
228
|
+
routingUrl: e.getProperty("routingurl"),
|
|
229
|
+
scrollWheelZoom: e.getProperty("scrollwheelzoom"),
|
|
230
|
+
tilesStyle: e.getProperty("tilesstyle")
|
|
841
231
|
};
|
|
842
232
|
}
|
|
843
|
-
}, CoreConfig = class
|
|
233
|
+
}, CoreConfig = class e {
|
|
844
234
|
static snippet;
|
|
845
235
|
livemapService = null;
|
|
846
236
|
env = "production";
|
|
@@ -848,18 +238,18 @@ var parseJSONSafely = function(o) {
|
|
|
848
238
|
getBaseUrl() {
|
|
849
239
|
return this.env === "production" ? "https://api.getwemap.com/v3.0" : "https://apidev.maaap.it/v3.0";
|
|
850
240
|
}
|
|
851
|
-
async init(
|
|
852
|
-
if (!
|
|
853
|
-
this.env =
|
|
241
|
+
async init(h) {
|
|
242
|
+
if (!h.emmid || !h.token) throw Error("emmid and token are required");
|
|
243
|
+
this.env = h.env || "production", this.livemapService = new LivemapService(this.getBaseUrl());
|
|
854
244
|
try {
|
|
855
|
-
let
|
|
856
|
-
|
|
857
|
-
} catch (
|
|
858
|
-
throw console.error("Failed to initialize Core SDK:",
|
|
245
|
+
let g = await this.livemapService.fetchLivemap(h.emmid);
|
|
246
|
+
e.snippet = SnippetParser.parse(g);
|
|
247
|
+
} catch (e) {
|
|
248
|
+
throw console.error("Failed to initialize Core SDK:", e), e;
|
|
859
249
|
}
|
|
860
250
|
}
|
|
861
251
|
static getConfig() {
|
|
862
|
-
return
|
|
252
|
+
return e.snippet || {};
|
|
863
253
|
}
|
|
864
254
|
};
|
|
865
255
|
const core = new CoreConfig();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SchemaKey, SchemaProperty, MapObjectType } from '../schemas/types';
|
|
2
|
-
import { BoundingBox } from '
|
|
2
|
+
import { BoundingBox } from '../../../geo';
|
|
3
3
|
export declare class SnippetParser {
|
|
4
4
|
static snippet: Record<string, any>;
|
|
5
5
|
static mapObject: MapObjectType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SnippetParser.d.ts","sourceRoot":"","sources":["../../../src/helpers/SnippetParser.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjF,OAAO,EAAE,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"SnippetParser.d.ts","sourceRoot":"","sources":["../../../src/helpers/SnippetParser.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjF,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAiGzC,qBAAa,aAAa;IACxB,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAM;IACzC,MAAM,CAAC,SAAS,EAAE,aAAa,CAAC;IAEhC,MAAM,CAAC,WAAW,CAAC,CAAC,SAAS,SAAS,EAAE,IAAI,EAAE,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC;IAqBnE,MAAM,CAAC,kBAAkB,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;;;IAuBvF,MAAM,CAAC,KAAK,CAAC,SAAS,EAAE,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyCtC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../src/types/common.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../src/types/common.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C,MAAM,MAAM,UAAU,GAClB,WAAW,GACX;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,GACxE,CAAC,MAAM,EAAE,MAAM,CAAC,GAChB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GACxB;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAAC"}
|
package/dist/src/utils/map.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BoundingBox, Coordinates } from '
|
|
1
|
+
import { BoundingBox, Coordinates } from '../../../geo';
|
|
2
2
|
import { LatLngLike } from '../types/common';
|
|
3
3
|
export declare const defaultBounds: BoundingBox;
|
|
4
4
|
export declare const correctBounds: (bounds: BoundingBox) => BoundingBox;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"map.d.ts","sourceRoot":"","sources":["../../../src/utils/map.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"map.d.ts","sourceRoot":"","sources":["../../../src/utils/map.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEtD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,eAAO,MAAM,aAAa,aAGzB,CAAC;AAIF,eAAO,MAAM,aAAa,GAAI,QAAQ,WAAW,gBA6BhD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,aAAa,GAAI,SAAS;IACrC,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;CACzB,GAAG,IAAI,gBAiBP,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,QAAQ,GAAG;;;;;CAwBxC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,GAAI,QAAQ,UAAU,gBA8BzD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vitest.config.d.ts","sourceRoot":"","sources":["../vitest.config.ts"],"names":[],"mappings":";AAMA,
|
|
1
|
+
{"version":3,"file":"vitest.config.d.ts","sourceRoot":"","sources":["../vitest.config.ts"],"names":[],"mappings":";AAMA,wBAcG"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wemap/core",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.2.0-beta.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"private": false,
|
|
6
6
|
"publishConfig": {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"files": [
|
|
18
18
|
"dist"
|
|
19
19
|
],
|
|
20
|
-
"
|
|
21
|
-
"@wemap/geo
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"@wemap/geo": "14.2.0-beta.0"
|
|
22
22
|
}
|
|
23
23
|
}
|