@twinmatrix/spatialverse-sdk-web 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +9 -9
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/CustomThreeJsWrapper.js +213 -294
- package/lib/cjs/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/CustomThreeJsWrapper.js.map +1 -1
- package/lib/cjs/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/utility/utils.js +43 -45
- package/lib/cjs/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/utility/utils.js.map +1 -1
- package/lib/cjs/meta-atlas-sdk/3DMap/MainMap.js +241 -271
- package/lib/cjs/meta-atlas-sdk/3DMap/MainMap.js.map +1 -1
- package/lib/cjs/meta-atlas-sdk/MetaAtlasCore/fetch-published-json.js +167 -215
- package/lib/cjs/meta-atlas-sdk/MetaAtlasCore/fetch-published-json.js.map +1 -1
- package/lib/cjs/meta-atlas-sdk/MetaAtlasCore/fetchMapObjectsData.js +28 -30
- package/lib/cjs/meta-atlas-sdk/MetaAtlasCore/fetchMapObjectsData.js.map +1 -1
- package/lib/cjs/meta-atlas-sdk/MetaAtlasCore/meta-atlas-sdk-core.js +876 -1188
- 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 +173 -163
- package/lib/cjs/meta-atlas-sdk/MetaAtlasCore/routing-core/index.js.map +1 -1
- package/lib/cjs/meta-atlas-sdk/MetaAtlasCore/routing-core/interfaces.js +6 -6
- package/lib/cjs/meta-atlas-sdk/MetaAtlasCore/routing-core/interfaces.js.map +1 -1
- package/lib/cjs/meta-atlas-sdk/MetaAtlasCore/routing-core/mapObjectsHelper.js +6 -6
- package/lib/cjs/meta-atlas-sdk/MetaAtlasCore/routing-core/mapObjectsHelper.js.map +1 -1
- package/lib/cjs/meta-atlas-sdk/MetaAtlasCore/routing-core/routeLayers.js +3 -3
- package/lib/cjs/meta-atlas-sdk/MetaAtlasCore/routing-core/routeLayers.js.map +1 -1
- package/lib/cjs/meta-atlas-sdk/MetaAtlasCore/routing-core/routing-helpers.js +546 -620
- 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 +155 -160
- package/lib/cjs/meta-atlas-sdk/MetaAtlasCore/routing-core/utils.js.map +1 -1
- package/lib/cjs/meta-atlas-sdk/customStyles.js +2 -2
- package/lib/cjs/meta-atlas-sdk/customStyles.js.map +1 -1
- package/lib/cjs/meta-atlas-sdk/customerLayer.js +15 -29
- package/lib/cjs/meta-atlas-sdk/customerLayer.js.map +1 -1
- package/lib/cjs/meta-atlas-sdk/customerLayerVariant.js +5 -5
- package/lib/cjs/meta-atlas-sdk/customerLayerVariant.js.map +1 -1
- package/lib/cjs/meta-atlas-sdk/meta-atlas-sdk.js +832 -1060
- package/lib/cjs/meta-atlas-sdk/meta-atlas-sdk.js.map +1 -1
- package/lib/cjs/meta-atlas-sdk/utils/helpers.js +33 -50
- package/lib/cjs/meta-atlas-sdk/utils/helpers.js.map +1 -1
- package/lib/cjs/meta-atlas-sdk/utils/local-storage.js +18 -36
- package/lib/cjs/meta-atlas-sdk/utils/local-storage.js.map +1 -1
- package/lib/cjs/meta-atlas-sdk/utils/mapobjects-store.js +6 -6
- package/lib/cjs/meta-atlas-sdk/utils/mapobjects-store.js.map +1 -1
- package/lib/cjs/meta-atlas-sdk/utils/routing-store.js +6 -6
- package/lib/cjs/meta-atlas-sdk/utils/routing-store.js.map +1 -1
- package/lib/cjs/meta-atlas-sdk/utils/routing-visualizer/index.js +428 -556
- package/lib/cjs/meta-atlas-sdk/utils/routing-visualizer/index.js.map +1 -1
- package/lib/cjs/react/MetaAtlasMap.js +127 -0
- package/lib/cjs/react/MetaAtlasMap.js.map +1 -0
- package/lib/cjs/react/hooks/useDrawing/index.js +17 -18
- package/lib/cjs/react/hooks/useDrawing/index.js.map +1 -1
- package/lib/cjs/react/hooks/useFocus/index.js +48 -55
- package/lib/cjs/react/hooks/useFocus/index.js.map +1 -1
- package/lib/cjs/react/hooks/useMapEvents/index.js +40 -50
- package/lib/cjs/react/hooks/useMapEvents/index.js.map +1 -1
- package/lib/cjs/react/hooks/useMapOverlays/index.js +20 -21
- package/lib/cjs/react/hooks/useMapOverlays/index.js.map +1 -1
- package/lib/cjs/react/hooks/useMetaAtlas/index.js +77 -95
- package/lib/cjs/react/hooks/useMetaAtlas/index.js.map +1 -1
- package/lib/cjs/react/hooks/useMetaAtlas.js +78 -96
- package/lib/cjs/react/hooks/useMetaAtlas.js.map +1 -1
- package/lib/cjs/react/hooks/useRouting/index.js +21 -20
- package/lib/cjs/react/hooks/useRouting/index.js.map +1 -1
- package/lib/cjs/react/hooks/useSearch/index.js +35 -34
- package/lib/cjs/react/hooks/useSearch/index.js.map +1 -1
- package/lib/cjs/react/hooks/useStampRally/index.js +30 -29
- package/lib/cjs/react/hooks/useStampRally/index.js.map +1 -1
- package/lib/cjs/react/hooks/useStampRally/utils.js +2 -2
- package/lib/cjs/react/hooks/useStampRally/utils.js.map +1 -1
- package/lib/cjs/react/index.js +31 -31
- package/lib/cjs/react/index.js.map +1 -1
- package/lib/cjs/react/stores/useMapDataStore.js +53 -64
- package/lib/cjs/react/stores/useMapDataStore.js.map +1 -1
- package/lib/cjs/react/stores/useMetaAtlasStore.js +27 -40
- package/lib/cjs/react/stores/useMetaAtlasStore.js.map +1 -1
- package/lib/esm/index.js +3 -7
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/CustomThreeJsWrapper.js +2 -1
- package/lib/esm/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/CustomThreeJsWrapper.js.map +1 -1
- package/lib/esm/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/utility/utils.js +10 -9
- package/lib/esm/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/utility/utils.js.map +1 -1
- package/lib/esm/meta-atlas-sdk/3DMap/MainMap.js +2 -2
- 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/fetchMapObjectsData.js +4 -3
- package/lib/esm/meta-atlas-sdk/MetaAtlasCore/fetchMapObjectsData.js.map +1 -1
- package/lib/esm/meta-atlas-sdk/MetaAtlasCore/meta-atlas-sdk-core.js +22 -14
- 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 +8 -8
- package/lib/esm/meta-atlas-sdk/MetaAtlasCore/routing-core/index.js.map +1 -1
- package/lib/esm/meta-atlas-sdk/MetaAtlasCore/routing-core/mapObjectsHelper.js +3 -3
- package/lib/esm/meta-atlas-sdk/MetaAtlasCore/routing-core/mapObjectsHelper.js.map +1 -1
- package/lib/esm/meta-atlas-sdk/MetaAtlasCore/routing-core/routing-helpers.js +18 -11
- 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 +4 -3
- package/lib/esm/meta-atlas-sdk/MetaAtlasCore/routing-core/utils.js.map +1 -1
- package/lib/esm/meta-atlas-sdk/customerLayer.js +4 -1
- package/lib/esm/meta-atlas-sdk/customerLayer.js.map +1 -1
- package/lib/esm/meta-atlas-sdk/meta-atlas-sdk.js +80 -61
- package/lib/esm/meta-atlas-sdk/meta-atlas-sdk.js.map +1 -1
- package/lib/esm/meta-atlas-sdk/utils/helpers.js +3 -1
- package/lib/esm/meta-atlas-sdk/utils/helpers.js.map +1 -1
- package/lib/esm/meta-atlas-sdk/utils/routing-visualizer/index.js +19 -15
- package/lib/esm/meta-atlas-sdk/utils/routing-visualizer/index.js.map +1 -1
- package/lib/esm/react/MetaAtlasMap.js +120 -0
- package/lib/esm/react/MetaAtlasMap.js.map +1 -0
- package/lib/esm/react/hooks/useDrawing/index.js +2 -2
- package/lib/esm/react/hooks/useDrawing/index.js.map +1 -1
- package/lib/esm/react/hooks/useFocus/index.js +4 -3
- package/lib/esm/react/hooks/useFocus/index.js.map +1 -1
- package/lib/esm/react/hooks/useMapEvents/index.js +3 -3
- package/lib/esm/react/hooks/useMapEvents/index.js.map +1 -1
- package/lib/esm/react/hooks/useMapOverlays/index.js +2 -2
- package/lib/esm/react/hooks/useMapOverlays/index.js.map +1 -1
- package/lib/esm/react/hooks/useMetaAtlas/index.js +162 -60
- package/lib/esm/react/hooks/useMetaAtlas/index.js.map +1 -1
- package/lib/esm/react/hooks/useMetaAtlas.js +162 -60
- package/lib/esm/react/hooks/useMetaAtlas.js.map +1 -1
- package/lib/esm/react/hooks/useRouting/index.js +2 -2
- package/lib/esm/react/hooks/useRouting/index.js.map +1 -1
- package/lib/esm/react/hooks/useSearch/index.js +2 -2
- package/lib/esm/react/hooks/useSearch/index.js.map +1 -1
- package/lib/esm/react/hooks/useStampRally/index.js +8 -7
- package/lib/esm/react/hooks/useStampRally/index.js.map +1 -1
- package/lib/esm/react/index.js +11 -15
- package/lib/esm/react/index.js.map +1 -1
- package/package.json +9 -6
|
@@ -8,16 +8,16 @@ import length from '@turf/length';
|
|
|
8
8
|
import area from '@turf/area';
|
|
9
9
|
import cloneDeep from 'lodash/cloneDeep';
|
|
10
10
|
import MapboxDraw from '@mapbox/mapbox-gl-draw';
|
|
11
|
-
import { customStyles, mapBoxDrawDefaultStyles } from
|
|
12
|
-
import DrawMarker from
|
|
13
|
-
import MarkerSelect from
|
|
14
|
-
import { MetaAtlasCore } from
|
|
15
|
-
import MainMap from
|
|
11
|
+
import { customStyles, mapBoxDrawDefaultStyles } from "./customStyles.js";
|
|
12
|
+
import DrawMarker from "./mapbox_draw_custom_modes/draw_marker.js";
|
|
13
|
+
import MarkerSelect from "./mapbox_draw_custom_modes/marker_select.js";
|
|
14
|
+
import { MetaAtlasCore } from "./MetaAtlasCore/meta-atlas-sdk-core.js";
|
|
15
|
+
import MainMap from "./3DMap/MainMap.js";
|
|
16
16
|
import { initializeApp } from 'firebase/app';
|
|
17
17
|
import { getAnalytics, logEvent } from "firebase/analytics";
|
|
18
|
-
import { RoutingVisualizer } from
|
|
19
|
-
import CustomerLayer from
|
|
20
|
-
import CustomerLayerVariant from
|
|
18
|
+
import { RoutingVisualizer } from "./utils/routing-visualizer/index.js";
|
|
19
|
+
import CustomerLayer from "./customerLayer.js";
|
|
20
|
+
import CustomerLayerVariant from "./customerLayerVariant.js";
|
|
21
21
|
import booleanPointInPolygon from '@turf/boolean-point-in-polygon';
|
|
22
22
|
var FilterType = /*#__PURE__*/function (FilterType) {
|
|
23
23
|
FilterType["Name"] = "title";
|
|
@@ -39,15 +39,15 @@ export let EventSource = /*#__PURE__*/function (EventSource) {
|
|
|
39
39
|
}({});
|
|
40
40
|
export const DEFAULT_MAP_STYLE = 'https://api.maptiler.com/maps/01985ac8-56d2-707b-afa8-68abfe8f18be/style.json?key=12H5hrITUbJ1sDrVPqkq';
|
|
41
41
|
export class MetaAtlasSdk {
|
|
42
|
-
onLoadCallback = undefined;
|
|
43
|
-
onLoadFailCallback = undefined;
|
|
42
|
+
onLoadCallback = (() => undefined)();
|
|
43
|
+
onLoadFailCallback = (() => undefined)();
|
|
44
44
|
mapLoaded = false;
|
|
45
45
|
onFailCallbackSent = false;
|
|
46
46
|
UserLayers = [];
|
|
47
47
|
defaultFocusedTaxonomy = 'where.gbtb';
|
|
48
48
|
currentFocus = this.defaultFocusedTaxonomy;
|
|
49
49
|
apiAuthenticationCallbackReceived = false;
|
|
50
|
-
routingVisualizer = new RoutingVisualizer(this);
|
|
50
|
+
routingVisualizer = (() => new RoutingVisualizer(this))();
|
|
51
51
|
// When token middleware is online that will check the tokens.
|
|
52
52
|
tileServer = 'https://atoms-map-tiles-middleware.sandbox.spatialverse.online';
|
|
53
53
|
// HOST = 'https://atoms-sdk.qa.cag.spatialverse.online/2.0.0/';
|
|
@@ -57,10 +57,10 @@ export class MetaAtlasSdk {
|
|
|
57
57
|
// empApiURL = 'https://atoms-api.dev.cag.spatialverse.online';
|
|
58
58
|
|
|
59
59
|
mapBoxDrawSourceID = 'drawnDataSource';
|
|
60
|
-
drawGeojsonData = {
|
|
60
|
+
drawGeojsonData = (() => ({
|
|
61
61
|
type: 'FeatureCollection',
|
|
62
62
|
features: []
|
|
63
|
-
};
|
|
63
|
+
}))();
|
|
64
64
|
popups = [];
|
|
65
65
|
markers = [];
|
|
66
66
|
setupFirebase() {
|
|
@@ -119,7 +119,11 @@ export class MetaAtlasSdk {
|
|
|
119
119
|
}
|
|
120
120
|
});
|
|
121
121
|
}
|
|
122
|
-
constructor(accessToken, secretKey
|
|
122
|
+
constructor(accessToken, secretKey) {
|
|
123
|
+
let onLoad = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : () => {};
|
|
124
|
+
let onLoadFail = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : errorMessage => {};
|
|
125
|
+
let onRoutingStatusUpdate = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : () => {};
|
|
126
|
+
let onSearchStatusUpdate = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : () => {};
|
|
123
127
|
this.accessToken = accessToken;
|
|
124
128
|
this.secretKey = secretKey;
|
|
125
129
|
this.onLoadCallback = onLoad;
|
|
@@ -318,7 +322,11 @@ export class MetaAtlasSdk {
|
|
|
318
322
|
getFocusTree() {
|
|
319
323
|
return this.metaAtlasCore.getFocusTree();
|
|
320
324
|
}
|
|
321
|
-
setDrawing(
|
|
325
|
+
setDrawing() {
|
|
326
|
+
let id = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
327
|
+
let where = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
328
|
+
let geom = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
|
329
|
+
let props = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
|
|
322
330
|
const clickedFeature = {
|
|
323
331
|
"id": id,
|
|
324
332
|
"where": where,
|
|
@@ -340,7 +348,8 @@ export class MetaAtlasSdk {
|
|
|
340
348
|
getMidPointOfFeature(feature) {
|
|
341
349
|
return this.metaAtlasCore.getMidPointOfFeature(feature);
|
|
342
350
|
}
|
|
343
|
-
dropPin(mapItemSelected, popupStyle
|
|
351
|
+
dropPin(mapItemSelected, popupStyle) {
|
|
352
|
+
let replaceLast = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
344
353
|
const pinObj = {
|
|
345
354
|
feature: mapItemSelected,
|
|
346
355
|
popupStyle: popupStyle
|
|
@@ -399,7 +408,8 @@ export class MetaAtlasSdk {
|
|
|
399
408
|
const match = text.match(/^(?:[^_]*_){3}([^_]*)/);
|
|
400
409
|
return match ? match[1] : null;
|
|
401
410
|
}
|
|
402
|
-
hidePin(
|
|
411
|
+
hidePin() {
|
|
412
|
+
let pinId = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '-1';
|
|
403
413
|
let targetPinId;
|
|
404
414
|
if (pinId === '-1') {
|
|
405
415
|
const lastPin = this.popups[this.popups.length - 1];
|
|
@@ -433,7 +443,8 @@ export class MetaAtlasSdk {
|
|
|
433
443
|
});
|
|
434
444
|
}
|
|
435
445
|
}
|
|
436
|
-
showPin(
|
|
446
|
+
showPin() {
|
|
447
|
+
let pinId = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '-1';
|
|
437
448
|
let targetPinId;
|
|
438
449
|
if (pinId === '-1') {
|
|
439
450
|
const lastPin = this.popups[this.popups.length - 1];
|
|
@@ -466,7 +477,8 @@ export class MetaAtlasSdk {
|
|
|
466
477
|
});
|
|
467
478
|
}
|
|
468
479
|
}
|
|
469
|
-
clearPin(
|
|
480
|
+
clearPin() {
|
|
481
|
+
let pinId = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '-1';
|
|
470
482
|
let targetPinIndex;
|
|
471
483
|
if (pinId === '-1') {
|
|
472
484
|
targetPinIndex = this.popups.length - 1;
|
|
@@ -570,7 +582,8 @@ export class MetaAtlasSdk {
|
|
|
570
582
|
// const layerFilter = updatedLayersData[index].filter;
|
|
571
583
|
// }
|
|
572
584
|
}
|
|
573
|
-
focusTo(whereTaxonomyPath
|
|
585
|
+
focusTo(whereTaxonomyPath) {
|
|
586
|
+
let moveCamera = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
574
587
|
const map = this.map;
|
|
575
588
|
let dimensionWhere = whereTaxonomyPath;
|
|
576
589
|
if (!dimensionWhere || !map) return;
|
|
@@ -606,7 +619,8 @@ export class MetaAtlasSdk {
|
|
|
606
619
|
this.map.setFilter(layerID, layerFilter);
|
|
607
620
|
}
|
|
608
621
|
}
|
|
609
|
-
filterLayersByType(filterType, filterValues
|
|
622
|
+
filterLayersByType(filterType, filterValues) {
|
|
623
|
+
let geomType = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
|
|
610
624
|
const map = this.map;
|
|
611
625
|
if (!filterValues || !map) return;
|
|
612
626
|
let userLayers = cloneDeep(this.UserLayers);
|
|
@@ -652,7 +666,8 @@ export class MetaAtlasSdk {
|
|
|
652
666
|
}
|
|
653
667
|
}
|
|
654
668
|
}
|
|
655
|
-
changeTerminalInFocusToUserViewpoint(
|
|
669
|
+
changeTerminalInFocusToUserViewpoint() {
|
|
670
|
+
let defaultFloor = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
656
671
|
let center = this.map.getCenter().wrap();
|
|
657
672
|
const centerArray = [center.lng, center.lat];
|
|
658
673
|
// console.log('center: ', center);
|
|
@@ -688,48 +703,50 @@ export class MetaAtlasSdk {
|
|
|
688
703
|
const isInside = booleanPointInPolygon(point, polygon);
|
|
689
704
|
return isInside;
|
|
690
705
|
}
|
|
691
|
-
getMapObjectsByFilteredLocalRef(
|
|
692
|
-
return this.metaAtlasCore.getMapObjectsByFilteredLocalRef(...
|
|
706
|
+
getMapObjectsByFilteredLocalRef() {
|
|
707
|
+
return this.metaAtlasCore.getMapObjectsByFilteredLocalRef(...arguments);
|
|
693
708
|
}
|
|
694
|
-
getMapObjectsByName(
|
|
695
|
-
return this.metaAtlasCore.getMapObjectsByName(...
|
|
709
|
+
getMapObjectsByName() {
|
|
710
|
+
return this.metaAtlasCore.getMapObjectsByName(...arguments);
|
|
696
711
|
}
|
|
697
|
-
getMapObjectById(
|
|
698
|
-
return this.metaAtlasCore.getMapObjectById(...
|
|
712
|
+
getMapObjectById() {
|
|
713
|
+
return this.metaAtlasCore.getMapObjectById(...arguments);
|
|
699
714
|
}
|
|
700
|
-
getMapObjectByLocalRef(
|
|
701
|
-
return this.metaAtlasCore.getMapObjectByLocalRef(...
|
|
715
|
+
getMapObjectByLocalRef() {
|
|
716
|
+
return this.metaAtlasCore.getMapObjectByLocalRef(...arguments);
|
|
702
717
|
}
|
|
703
|
-
getMapObjectMatchingLocalRef(
|
|
704
|
-
return this.metaAtlasCore.getMapObjectMatchingLocalRef(...
|
|
718
|
+
getMapObjectMatchingLocalRef() {
|
|
719
|
+
return this.metaAtlasCore.getMapObjectMatchingLocalRef(...arguments);
|
|
705
720
|
}
|
|
706
|
-
getMapObjectsMatchingLocalRefs(
|
|
707
|
-
return this.metaAtlasCore.getMapObjectsMatchingLocalRefs(...
|
|
721
|
+
getMapObjectsMatchingLocalRefs() {
|
|
722
|
+
return this.metaAtlasCore.getMapObjectsMatchingLocalRefs(...arguments);
|
|
708
723
|
}
|
|
709
|
-
getMapObjectsByWhatTaxonomy(
|
|
710
|
-
return this.metaAtlasCore.getMapObjectsByWhatTaxonomy(...
|
|
724
|
+
getMapObjectsByWhatTaxonomy() {
|
|
725
|
+
return this.metaAtlasCore.getMapObjectsByWhatTaxonomy(...arguments);
|
|
711
726
|
}
|
|
712
|
-
getMapObjectsByWhatTaxonomyAPI(
|
|
713
|
-
return this.metaAtlasCore.getMapObjectsByWhatTaxonomyAPI(...
|
|
727
|
+
getMapObjectsByWhatTaxonomyAPI() {
|
|
728
|
+
return this.metaAtlasCore.getMapObjectsByWhatTaxonomyAPI(...arguments);
|
|
714
729
|
}
|
|
715
|
-
getMapObjectsByWhereTaxonomy(
|
|
716
|
-
return this.metaAtlasCore.getMapObjectsByWhereTaxonomy(...
|
|
730
|
+
getMapObjectsByWhereTaxonomy() {
|
|
731
|
+
return this.metaAtlasCore.getMapObjectsByWhereTaxonomy(...arguments);
|
|
717
732
|
}
|
|
718
|
-
getMapObjectsByWhatAndWhereTaxonomy(
|
|
719
|
-
return this.metaAtlasCore.getMapObjectsByWhatAndWhereTaxonomy(...
|
|
733
|
+
getMapObjectsByWhatAndWhereTaxonomy() {
|
|
734
|
+
return this.metaAtlasCore.getMapObjectsByWhatAndWhereTaxonomy(...arguments);
|
|
720
735
|
}
|
|
721
|
-
getMapObjectsInWhatTaxonomy(
|
|
722
|
-
return this.metaAtlasCore.getMapObjectsInWhatTaxonomy(...
|
|
736
|
+
getMapObjectsInWhatTaxonomy() {
|
|
737
|
+
return this.metaAtlasCore.getMapObjectsInWhatTaxonomy(...arguments);
|
|
723
738
|
}
|
|
724
|
-
getMapObjectsInWhereTaxonomy(
|
|
725
|
-
return this.metaAtlasCore.getMapObjectsInWhereTaxonomy(...
|
|
739
|
+
getMapObjectsInWhereTaxonomy() {
|
|
740
|
+
return this.metaAtlasCore.getMapObjectsInWhereTaxonomy(...arguments);
|
|
726
741
|
}
|
|
727
742
|
|
|
728
743
|
// Routing
|
|
729
|
-
computeRoute(
|
|
730
|
-
return this.routingVisualizer.computeRoute(...
|
|
744
|
+
computeRoute() {
|
|
745
|
+
return this.routingVisualizer.computeRoute(...arguments);
|
|
731
746
|
}
|
|
732
|
-
computeRoutes(mapObjectIds
|
|
747
|
+
computeRoutes(mapObjectIds) {
|
|
748
|
+
let wheelChairAccessibleRouteOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
749
|
+
let source = arguments.length > 2 ? arguments[2] : undefined;
|
|
733
750
|
const ref = this;
|
|
734
751
|
const logRouteEvent = async () => {
|
|
735
752
|
const getNameByIdAsync = id => {
|
|
@@ -759,21 +776,22 @@ export class MetaAtlasSdk {
|
|
|
759
776
|
logRouteEvent();
|
|
760
777
|
return this.routingVisualizer.computeRoutes(mapObjectIds, wheelChairAccessibleRouteOnly);
|
|
761
778
|
}
|
|
762
|
-
setActiveRoute(
|
|
763
|
-
return this.routingVisualizer.setActiveRoute(...
|
|
779
|
+
setActiveRoute() {
|
|
780
|
+
return this.routingVisualizer.setActiveRoute(...arguments);
|
|
764
781
|
}
|
|
765
|
-
getActiveRoute(
|
|
766
|
-
return this.routingVisualizer.getActiveRoute(...
|
|
782
|
+
getActiveRoute() {
|
|
783
|
+
return this.routingVisualizer.getActiveRoute(...arguments);
|
|
767
784
|
}
|
|
768
|
-
highlightRouteSegment(
|
|
769
|
-
return this.routingVisualizer.highlightRouteSegment(...
|
|
785
|
+
highlightRouteSegment() {
|
|
786
|
+
return this.routingVisualizer.highlightRouteSegment(...arguments);
|
|
770
787
|
}
|
|
771
|
-
clearRoute(
|
|
772
|
-
return this.routingVisualizer.clearRoute(...
|
|
788
|
+
clearRoute() {
|
|
789
|
+
return this.routingVisualizer.clearRoute(...arguments);
|
|
773
790
|
}
|
|
774
791
|
|
|
775
792
|
// Drawing
|
|
776
|
-
drawGeometryOnMap(type, onDrawEnd
|
|
793
|
+
drawGeometryOnMap(type, onDrawEnd) {
|
|
794
|
+
let onlyVisibleAtCurrentFocus = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
777
795
|
//if already in edit mode
|
|
778
796
|
if (this.mapBoxDraw.getMode() !== 'simple_select') return false;
|
|
779
797
|
let modeChanged = false;
|
|
@@ -913,9 +931,10 @@ export class MetaAtlasSdk {
|
|
|
913
931
|
getCoordinates(feature) {
|
|
914
932
|
return getCoords(feature);
|
|
915
933
|
}
|
|
916
|
-
getLength(feature
|
|
917
|
-
|
|
918
|
-
|
|
934
|
+
getLength(feature) {
|
|
935
|
+
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
|
|
936
|
+
units: 'kilometers'
|
|
937
|
+
};
|
|
919
938
|
if (feature.geometry && feature.geometry.type) {
|
|
920
939
|
const type = feature.geometry.type;
|
|
921
940
|
if (type === 'LineString' || type === 'MultiLineString') {
|