@twinmatrix/spatialverse-sdk-web 0.0.3 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of @twinmatrix/spatialverse-sdk-web might be problematic. Click here for more details.
- package/lib/cjs/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/CustomThreeJsWrapper.js +2 -2
- package/lib/cjs/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/CustomThreeJsWrapper.js.map +1 -1
- package/lib/cjs/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/utility/CameraSync.js +293 -0
- package/lib/cjs/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/utility/CameraSync.js.map +1 -0
- package/lib/cjs/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/utility/CameraUtils.js +35 -0
- package/lib/cjs/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/utility/CameraUtils.js.map +1 -0
- package/lib/cjs/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/utility/constants.js +33 -0
- package/lib/cjs/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/utility/constants.js.map +1 -0
- package/lib/cjs/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/utility/suncalc.js +307 -0
- package/lib/cjs/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/utility/suncalc.js.map +1 -0
- package/lib/cjs/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/utility/utils.js +4 -3
- package/lib/cjs/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/utility/utils.js.map +1 -1
- package/lib/cjs/meta-atlas-sdk/3DMap/MainMap.js +202 -198
- package/lib/cjs/meta-atlas-sdk/3DMap/MainMap.js.map +1 -1
- package/lib/cjs/meta-atlas-sdk/MetaAtlasCore/fetch-published-json.js +3 -3
- package/lib/cjs/meta-atlas-sdk/MetaAtlasCore/fetch-published-json.js.map +1 -1
- package/lib/cjs/meta-atlas-sdk/MetaAtlasCore/focustree.json +121 -0
- package/lib/cjs/meta-atlas-sdk/MetaAtlasCore/meta-atlas-sdk-core.js +32 -29
- package/lib/cjs/meta-atlas-sdk/MetaAtlasCore/meta-atlas-sdk-core.js.map +1 -1
- package/lib/cjs/meta-atlas-sdk/MetaAtlasCore/routing-core/index.js +10 -13
- package/lib/cjs/meta-atlas-sdk/MetaAtlasCore/routing-core/index.js.map +1 -1
- package/lib/cjs/meta-atlas-sdk/MetaAtlasCore/routing-core/routing-helpers.js +55 -68
- package/lib/cjs/meta-atlas-sdk/MetaAtlasCore/routing-core/routing-helpers.js.map +1 -1
- package/lib/cjs/meta-atlas-sdk/MetaAtlasCore/routing-core/utils.js +12 -12
- package/lib/cjs/meta-atlas-sdk/MetaAtlasCore/routing-core/utils.js.map +1 -1
- package/lib/cjs/meta-atlas-sdk/MetaAtlasCore/whatTaxonomies.json +170 -0
- package/lib/cjs/meta-atlas-sdk/combined_style.json +2313 -0
- package/lib/cjs/meta-atlas-sdk/mapbox_draw_custom_modes/draw_marker.js +166 -0
- package/lib/cjs/meta-atlas-sdk/mapbox_draw_custom_modes/draw_marker.js.map +1 -0
- package/lib/cjs/meta-atlas-sdk/mapbox_draw_custom_modes/marker_select.js +229 -0
- package/lib/cjs/meta-atlas-sdk/mapbox_draw_custom_modes/marker_select.js.map +1 -0
- package/lib/cjs/meta-atlas-sdk/meta-atlas-sdk.js +73 -69
- package/lib/cjs/meta-atlas-sdk/meta-atlas-sdk.js.map +1 -1
- package/lib/cjs/meta-atlas-sdk/utils/helpers.js +1 -1
- package/lib/cjs/meta-atlas-sdk/utils/helpers.js.map +1 -1
- package/lib/cjs/meta-atlas-sdk/utils/local-storage.js +6 -1
- package/lib/cjs/meta-atlas-sdk/utils/local-storage.js.map +1 -1
- package/lib/cjs/meta-atlas-sdk/utils/routing-visualizer/index.js +103 -103
- package/lib/cjs/meta-atlas-sdk/utils/routing-visualizer/index.js.map +1 -1
- package/lib/cjs/react/MetaAtlasMap.js +4 -4
- package/lib/cjs/react/MetaAtlasMap.js.map +1 -1
- package/lib/cjs/react/hooks/useMapEvents/index.js +6 -3
- package/lib/cjs/react/hooks/useMapEvents/index.js.map +1 -1
- package/lib/cjs/react/hooks/useStampRally/index.js +7 -5
- package/lib/cjs/react/hooks/useStampRally/index.js.map +1 -1
- package/lib/cjs/react/hooks/useStampRally/utils.js +1 -1
- package/lib/cjs/react/hooks/useStampRally/utils.js.map +1 -1
- package/lib/cjs/react/stores/useMapDataStore.js +17 -21
- package/lib/cjs/react/stores/useMapDataStore.js.map +1 -1
- package/lib/esm/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/CustomThreeJsWrapper.js +2 -2
- package/lib/esm/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/CustomThreeJsWrapper.js.map +1 -1
- package/lib/esm/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/utility/CameraSync.js +286 -0
- package/lib/esm/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/utility/CameraSync.js.map +1 -0
- package/lib/esm/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/utility/CameraUtils.js +27 -0
- package/lib/esm/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/utility/CameraUtils.js.map +1 -0
- package/lib/esm/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/utility/constants.js +27 -0
- package/lib/esm/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/utility/constants.js.map +1 -0
- package/lib/esm/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/utility/suncalc.js +305 -0
- package/lib/esm/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/utility/suncalc.js.map +1 -0
- package/lib/esm/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/utility/utils.js +4 -3
- package/lib/esm/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/utility/utils.js.map +1 -1
- package/lib/esm/meta-atlas-sdk/3DMap/MainMap.js +202 -198
- package/lib/esm/meta-atlas-sdk/3DMap/MainMap.js.map +1 -1
- package/lib/esm/meta-atlas-sdk/MetaAtlasCore/fetch-published-json.js +3 -3
- package/lib/esm/meta-atlas-sdk/MetaAtlasCore/fetch-published-json.js.map +1 -1
- package/lib/esm/meta-atlas-sdk/MetaAtlasCore/focustree.json +121 -0
- package/lib/esm/meta-atlas-sdk/MetaAtlasCore/meta-atlas-sdk-core.js +32 -29
- package/lib/esm/meta-atlas-sdk/MetaAtlasCore/meta-atlas-sdk-core.js.map +1 -1
- package/lib/esm/meta-atlas-sdk/MetaAtlasCore/routing-core/index.js +10 -8
- package/lib/esm/meta-atlas-sdk/MetaAtlasCore/routing-core/index.js.map +1 -1
- package/lib/esm/meta-atlas-sdk/MetaAtlasCore/routing-core/routing-helpers.js +55 -68
- package/lib/esm/meta-atlas-sdk/MetaAtlasCore/routing-core/routing-helpers.js.map +1 -1
- package/lib/esm/meta-atlas-sdk/MetaAtlasCore/routing-core/utils.js +12 -12
- package/lib/esm/meta-atlas-sdk/MetaAtlasCore/routing-core/utils.js.map +1 -1
- package/lib/esm/meta-atlas-sdk/MetaAtlasCore/whatTaxonomies.json +170 -0
- package/lib/esm/meta-atlas-sdk/combined_style.json +2313 -0
- package/lib/esm/meta-atlas-sdk/mapbox_draw_custom_modes/draw_marker.js +158 -0
- package/lib/esm/meta-atlas-sdk/mapbox_draw_custom_modes/draw_marker.js.map +1 -0
- package/lib/esm/meta-atlas-sdk/mapbox_draw_custom_modes/marker_select.js +221 -0
- package/lib/esm/meta-atlas-sdk/mapbox_draw_custom_modes/marker_select.js.map +1 -0
- package/lib/esm/meta-atlas-sdk/meta-atlas-sdk.js +73 -68
- package/lib/esm/meta-atlas-sdk/meta-atlas-sdk.js.map +1 -1
- package/lib/esm/meta-atlas-sdk/utils/helpers.js +1 -1
- package/lib/esm/meta-atlas-sdk/utils/helpers.js.map +1 -1
- package/lib/esm/meta-atlas-sdk/utils/local-storage.js +6 -1
- package/lib/esm/meta-atlas-sdk/utils/local-storage.js.map +1 -1
- package/lib/esm/meta-atlas-sdk/utils/routing-visualizer/index.js +103 -101
- package/lib/esm/meta-atlas-sdk/utils/routing-visualizer/index.js.map +1 -1
- package/lib/esm/react/MetaAtlasMap.js +4 -4
- package/lib/esm/react/MetaAtlasMap.js.map +1 -1
- package/lib/esm/react/hooks/useMapEvents/index.js +6 -3
- package/lib/esm/react/hooks/useMapEvents/index.js.map +1 -1
- package/lib/esm/react/hooks/useStampRally/index.js +7 -5
- package/lib/esm/react/hooks/useStampRally/index.js.map +1 -1
- package/lib/esm/react/hooks/useStampRally/utils.js +1 -1
- package/lib/esm/react/hooks/useStampRally/utils.js.map +1 -1
- package/lib/esm/react/stores/useMapDataStore.js +17 -21
- package/lib/esm/react/stores/useMapDataStore.js.map +1 -1
- package/lib/types/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/utility/CameraSync.d.ts +30 -0
- package/lib/types/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/utility/CameraSync.d.ts.map +1 -0
- package/lib/types/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/utility/CameraUtils.d.ts +5 -0
- package/lib/types/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/utility/CameraUtils.d.ts.map +1 -0
- package/lib/types/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/utility/constants.d.ts +21 -0
- package/lib/types/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/utility/constants.d.ts.map +1 -0
- package/lib/types/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/utility/suncalc.d.ts +27 -0
- package/lib/types/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/utility/suncalc.d.ts.map +1 -0
- package/lib/types/meta-atlas-sdk/mapbox_draw_custom_modes/draw_marker.d.ts +18 -0
- package/lib/types/meta-atlas-sdk/mapbox_draw_custom_modes/draw_marker.d.ts.map +1 -0
- package/lib/types/meta-atlas-sdk/mapbox_draw_custom_modes/marker_select.d.ts +37 -0
- package/lib/types/meta-atlas-sdk/mapbox_draw_custom_modes/marker_select.d.ts.map +1 -0
- package/package.json +4 -4
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
{
|
|
2
|
+
"site": {
|
|
3
|
+
"name": "Singapore",
|
|
4
|
+
"taxonomyPath": "where.singapore",
|
|
5
|
+
"cameraConfigs": {
|
|
6
|
+
"mobile": {
|
|
7
|
+
"zoom": 20,
|
|
8
|
+
"center": [103.852996655352, 1.2944483519089962],
|
|
9
|
+
"bearing": -55,
|
|
10
|
+
"pitch": 42
|
|
11
|
+
},
|
|
12
|
+
"web": {
|
|
13
|
+
"zoom": 20,
|
|
14
|
+
"center": [103.852996655352, 1.2944483519089962],
|
|
15
|
+
"bearing": -55,
|
|
16
|
+
"pitch": 42
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"buildings": [
|
|
20
|
+
{
|
|
21
|
+
"name": "RCCC",
|
|
22
|
+
"taxonomyPath": "where.singapore.rfcc",
|
|
23
|
+
"defaultFloorPath": "where.singapore.rfcc.level_4",
|
|
24
|
+
"cameraConfigs": {
|
|
25
|
+
"mobile": {
|
|
26
|
+
"zoom": 20,
|
|
27
|
+
"center": [103.852996655352, 1.2944483519089962],
|
|
28
|
+
"bearing": -55,
|
|
29
|
+
"pitch": 42
|
|
30
|
+
},
|
|
31
|
+
"web": {
|
|
32
|
+
"zoom": 20,
|
|
33
|
+
"center": [103.852996655352, 1.2944483519089962],
|
|
34
|
+
"bearing": -55,
|
|
35
|
+
"pitch": 42
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"bounds": [
|
|
39
|
+
[103.85320731171177, 1.2948914975277541],
|
|
40
|
+
[103.85421314010136, 1.2941272630719642],
|
|
41
|
+
[103.85348894366088, 1.2929286211985838],
|
|
42
|
+
[103.85317244299428, 1.2948914975277541]
|
|
43
|
+
],
|
|
44
|
+
"floors": [
|
|
45
|
+
{
|
|
46
|
+
"name": "Level 1",
|
|
47
|
+
"taxonomyPath": "where.singapore.rfcc.level_1",
|
|
48
|
+
"cameraConfigs": {
|
|
49
|
+
"mobile": {
|
|
50
|
+
"zoom": 19.35,
|
|
51
|
+
"center": [103.85364319364783, 1.294008192054065],
|
|
52
|
+
"bearing": -55,
|
|
53
|
+
"pitch": 42
|
|
54
|
+
},
|
|
55
|
+
"web": {
|
|
56
|
+
"zoom": 19.5,
|
|
57
|
+
"center": [103.85346012604555, 1.293763243193382],
|
|
58
|
+
"bearing": -53,
|
|
59
|
+
"pitch": 38.23
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"name": "Level 4",
|
|
65
|
+
"taxonomyPath": "where.singapore.rfcc.level_4",
|
|
66
|
+
"cameraConfigs": {
|
|
67
|
+
"mobile": {
|
|
68
|
+
"zoom": 20,
|
|
69
|
+
"center": [103.852996655352, 1.2944483519089962],
|
|
70
|
+
"bearing": -55,
|
|
71
|
+
"pitch": 42
|
|
72
|
+
},
|
|
73
|
+
"web": {
|
|
74
|
+
"zoom": 20,
|
|
75
|
+
"center": [103.852996655352, 1.2944483519089962],
|
|
76
|
+
"bearing": -55,
|
|
77
|
+
"pitch": 42
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"name": "Level 69",
|
|
83
|
+
"taxonomyPath": "where.singapore.rfcc.level_69",
|
|
84
|
+
"cameraConfigs": {
|
|
85
|
+
"mobile": {
|
|
86
|
+
"zoom": 18.1,
|
|
87
|
+
"center": [103.85374636384404, 1.293577568494925],
|
|
88
|
+
"bearing": -55,
|
|
89
|
+
"pitch": 42
|
|
90
|
+
},
|
|
91
|
+
"web": {
|
|
92
|
+
"zoom": 19.4,
|
|
93
|
+
"center": [103.85361309798509, 1.293664890336487],
|
|
94
|
+
"bearing": -54.3,
|
|
95
|
+
"pitch": 44.5
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"name": "Level 70",
|
|
101
|
+
"taxonomyPath": "where.singapore.rfcc.level_70",
|
|
102
|
+
"cameraConfigs": {
|
|
103
|
+
"mobile": {
|
|
104
|
+
"zoom": 18.1,
|
|
105
|
+
"center": [103.85374636384404, 1.293577568494925],
|
|
106
|
+
"bearing": -55,
|
|
107
|
+
"pitch": 42
|
|
108
|
+
},
|
|
109
|
+
"web": {
|
|
110
|
+
"zoom": 19.4,
|
|
111
|
+
"center": [103.85361309798509, 1.293664890336487],
|
|
112
|
+
"bearing": -54.3,
|
|
113
|
+
"pitch": 44.5
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
]
|
|
118
|
+
}
|
|
119
|
+
]
|
|
120
|
+
}
|
|
121
|
+
}
|
|
@@ -16,6 +16,11 @@ var _localStorage = require("../utils/local-storage.js");
|
|
|
16
16
|
var _fetchPublishedJson = require("./fetch-published-json.js");
|
|
17
17
|
var _mapobjectsStore = _interopRequireDefault(require("../utils/mapobjects-store.js"));
|
|
18
18
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
19
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
20
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
21
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
22
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
23
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
19
24
|
// Type for clicked features that includes both metaFeature data and raw click event
|
|
20
25
|
var SortType = /*#__PURE__*/function (SortType) {
|
|
21
26
|
SortType["Name"] = "Name";
|
|
@@ -31,21 +36,22 @@ let FilterType = exports.FilterType = /*#__PURE__*/function (FilterType) {
|
|
|
31
36
|
return FilterType;
|
|
32
37
|
}({});
|
|
33
38
|
class MetaAtlasCore {
|
|
34
|
-
defaultFocusedTaxonomy = 'where.changi';
|
|
35
|
-
searchableGeoJsonFeatures = [];
|
|
36
|
-
currentFocus = this.defaultFocusedTaxonomy;
|
|
37
|
-
// For ATOMS API
|
|
38
|
-
token = '';
|
|
39
|
-
empApi = '';
|
|
40
|
-
atomsAPIAccessToken = '';
|
|
41
|
-
apiRequestLimit = 5000;
|
|
42
|
-
|
|
43
|
-
// For Routing & Search
|
|
44
|
-
secretKeyForDecryption = '';
|
|
45
|
-
routingStatus = (() => _fetchPublishedJson.Status.Awaiting)();
|
|
46
|
-
searchStatus = (() => _fetchPublishedJson.Status.Awaiting)();
|
|
47
|
-
storage = (() => new _localStorage.LocalStorage())();
|
|
48
39
|
constructor() {
|
|
40
|
+
_defineProperty(this, "defaultFocusedTaxonomy", 'where.changi');
|
|
41
|
+
_defineProperty(this, "searchableGeoJsonFeatures", []);
|
|
42
|
+
_defineProperty(this, "currentFocus", this.defaultFocusedTaxonomy);
|
|
43
|
+
// For ATOMS API
|
|
44
|
+
_defineProperty(this, "token", '');
|
|
45
|
+
_defineProperty(this, "empApi", '');
|
|
46
|
+
_defineProperty(this, "atomsAPIAccessToken", '');
|
|
47
|
+
_defineProperty(this, "apiRequestLimit", 5000);
|
|
48
|
+
// For Routing & Search
|
|
49
|
+
_defineProperty(this, "secretKeyForDecryption", '');
|
|
50
|
+
_defineProperty(this, "routingStatus", _fetchPublishedJson.Status.Awaiting);
|
|
51
|
+
_defineProperty(this, "searchStatus", _fetchPublishedJson.Status.Awaiting);
|
|
52
|
+
_defineProperty(this, "storage", new _localStorage.LocalStorage());
|
|
53
|
+
_defineProperty(this, "ignoredLayers", ['Aerodrome', 'Aerodrome names', 'Aerobridge', 'Aerobridge gates', 'Airplanes', 'Airplanes outline', 'Building Extrusion', 'Building icon', 'Building overlay', 'Building overlay outline', 'Building underlay', 'Building underlay icon', 'Building underlay selected outline', 'building_outline', 'Changi Airport Connector', 'Changi Airport Connector Text', 'Changi Walkway Text', 'T2 overlay outline copy', 'Building overlay base', 'Skytrain track outdoor']);
|
|
54
|
+
_defineProperty(this, "nonFloorLayers", ['where.changi', 'where.changi.tarmac', 'where.changi.tarmac.public', 'where.changi.tarmac.private', 'where.changi.terminals', 'where.changi.terminals.jewel', 'where.changi.terminals.t1', 'where.changi.terminals.t2', 'where.changi.terminals.t3', 'where.changi.terminals.t4', 'where.hkcec.main_bldg', 'where.gbtb.flower_dome', 'where.lima', 'where.lima.mahsuri_center', 'where.lima.maritime', 'where.malaysia', 'where.malaysia.bcck', 'where.malaysia.rmh', 'where.malaysia.pm', 'where.indonesia.fairmont_jakarta']);
|
|
49
55
|
this.lastClicked = {
|
|
50
56
|
mapObjectId: null,
|
|
51
57
|
coordinates: null,
|
|
@@ -72,14 +78,15 @@ class MetaAtlasCore {
|
|
|
72
78
|
});
|
|
73
79
|
const config = {
|
|
74
80
|
method: 'post',
|
|
75
|
-
url:
|
|
81
|
+
url: "".concat(this.empApi, "/authentication"),
|
|
76
82
|
headers: {
|
|
77
83
|
'Content-Type': 'application/json'
|
|
78
84
|
},
|
|
79
85
|
data: data
|
|
80
86
|
};
|
|
81
87
|
(0, _axios.default)(config).then(async response => {
|
|
82
|
-
|
|
88
|
+
var _response$data;
|
|
89
|
+
if (response !== null && response !== void 0 && (_response$data = response.data) !== null && _response$data !== void 0 && _response$data.accessToken) {
|
|
83
90
|
this.atomsAPIAccessToken = response.data.accessToken;
|
|
84
91
|
onAuthenticationResponse({
|
|
85
92
|
authenticated: true
|
|
@@ -113,15 +120,13 @@ class MetaAtlasCore {
|
|
|
113
120
|
setLastClickedFeature(featureData) {
|
|
114
121
|
if (featureData.mapObjectId) {
|
|
115
122
|
this.getMapObjectById(featureData.mapObjectId, res => {
|
|
116
|
-
const mo = res
|
|
123
|
+
const mo = res === null || res === void 0 ? void 0 : res[0];
|
|
117
124
|
if (mo) {
|
|
118
|
-
this.lastClicked = {
|
|
119
|
-
|
|
120
|
-
properties: {
|
|
121
|
-
...featureData.properties,
|
|
125
|
+
this.lastClicked = _objectSpread(_objectSpread({}, featureData), {}, {
|
|
126
|
+
properties: _objectSpread(_objectSpread({}, featureData.properties), {}, {
|
|
122
127
|
booth_info: mo.properties.booth_info
|
|
123
|
-
}
|
|
124
|
-
};
|
|
128
|
+
})
|
|
129
|
+
});
|
|
125
130
|
}
|
|
126
131
|
});
|
|
127
132
|
} else {
|
|
@@ -246,8 +251,6 @@ class MetaAtlasCore {
|
|
|
246
251
|
let isViewingFloor = (0, _booleanPointInPolygon.default)(centerPoint, fBounds);
|
|
247
252
|
return isViewingBuilding || isViewingFloor;
|
|
248
253
|
}
|
|
249
|
-
ignoredLayers = ['Aerodrome', 'Aerodrome names', 'Aerobridge', 'Aerobridge gates', 'Airplanes', 'Airplanes outline', 'Building Extrusion', 'Building icon', 'Building overlay', 'Building overlay outline', 'Building underlay', 'Building underlay icon', 'Building underlay selected outline', 'building_outline', 'Changi Airport Connector', 'Changi Airport Connector Text', 'Changi Walkway Text', 'T2 overlay outline copy', 'Building overlay base', 'Skytrain track outdoor'];
|
|
250
|
-
nonFloorLayers = ['where.changi', 'where.changi.tarmac', 'where.changi.tarmac.public', 'where.changi.tarmac.private', 'where.changi.terminals', 'where.changi.terminals.jewel', 'where.changi.terminals.t1', 'where.changi.terminals.t2', 'where.changi.terminals.t3', 'where.changi.terminals.t4', 'where.hkcec.main_bldg', 'where.gbtb.flower_dome', 'where.lima', 'where.lima.mahsuri_center', 'where.lima.maritime', 'where.malaysia', 'where.malaysia.bcck', 'where.malaysia.rmh', 'where.malaysia.pm', 'where.indonesia.fairmont_jakarta'];
|
|
251
254
|
filterBaseMapWhereDimension(layersData, whereTaxonomyPath) {
|
|
252
255
|
let dimensionWhere = whereTaxonomyPath;
|
|
253
256
|
if (!dimensionWhere) {
|
|
@@ -1017,9 +1020,9 @@ class MetaAtlasCore {
|
|
|
1017
1020
|
let query = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
1018
1021
|
return new Promise((resolve, reject) => {
|
|
1019
1022
|
(0, _axios.default)({
|
|
1020
|
-
url:
|
|
1023
|
+
url: "".concat(this.empApi, "/map-objects").concat(query),
|
|
1021
1024
|
headers: {
|
|
1022
|
-
Authorization:
|
|
1025
|
+
Authorization: "Bearer ".concat(this.atomsAPIAccessToken)
|
|
1023
1026
|
},
|
|
1024
1027
|
method: 'get'
|
|
1025
1028
|
}).then(response => {
|
|
@@ -1032,8 +1035,8 @@ class MetaAtlasCore {
|
|
|
1032
1035
|
});
|
|
1033
1036
|
}
|
|
1034
1037
|
getMapObjectsByWhatTaxonomyAPI(whatTaxonomyPath, onResponseCallback) {
|
|
1035
|
-
let query =
|
|
1036
|
-
if (whatTaxonomyPath) query +=
|
|
1038
|
+
let query = "?$limit=".concat(this.apiRequestLimit);
|
|
1039
|
+
if (whatTaxonomyPath) query += "&taxonomy2Path=".concat(whatTaxonomyPath);
|
|
1037
1040
|
this.getMapObjectsApi(query).then(onResponseCallback).catch(onResponseCallback);
|
|
1038
1041
|
}
|
|
1039
1042
|
}
|