@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.
Files changed (125) hide show
  1. package/lib/cjs/index.js +9 -9
  2. package/lib/cjs/index.js.map +1 -1
  3. package/lib/cjs/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/CustomThreeJsWrapper.js +213 -294
  4. package/lib/cjs/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/CustomThreeJsWrapper.js.map +1 -1
  5. package/lib/cjs/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/utility/utils.js +43 -45
  6. package/lib/cjs/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/utility/utils.js.map +1 -1
  7. package/lib/cjs/meta-atlas-sdk/3DMap/MainMap.js +241 -271
  8. package/lib/cjs/meta-atlas-sdk/3DMap/MainMap.js.map +1 -1
  9. package/lib/cjs/meta-atlas-sdk/MetaAtlasCore/fetch-published-json.js +167 -215
  10. package/lib/cjs/meta-atlas-sdk/MetaAtlasCore/fetch-published-json.js.map +1 -1
  11. package/lib/cjs/meta-atlas-sdk/MetaAtlasCore/fetchMapObjectsData.js +28 -30
  12. package/lib/cjs/meta-atlas-sdk/MetaAtlasCore/fetchMapObjectsData.js.map +1 -1
  13. package/lib/cjs/meta-atlas-sdk/MetaAtlasCore/meta-atlas-sdk-core.js +876 -1188
  14. package/lib/cjs/meta-atlas-sdk/MetaAtlasCore/meta-atlas-sdk-core.js.map +1 -1
  15. package/lib/cjs/meta-atlas-sdk/MetaAtlasCore/routing-core/index.js +173 -163
  16. package/lib/cjs/meta-atlas-sdk/MetaAtlasCore/routing-core/index.js.map +1 -1
  17. package/lib/cjs/meta-atlas-sdk/MetaAtlasCore/routing-core/interfaces.js +6 -6
  18. package/lib/cjs/meta-atlas-sdk/MetaAtlasCore/routing-core/interfaces.js.map +1 -1
  19. package/lib/cjs/meta-atlas-sdk/MetaAtlasCore/routing-core/mapObjectsHelper.js +6 -6
  20. package/lib/cjs/meta-atlas-sdk/MetaAtlasCore/routing-core/mapObjectsHelper.js.map +1 -1
  21. package/lib/cjs/meta-atlas-sdk/MetaAtlasCore/routing-core/routeLayers.js +3 -3
  22. package/lib/cjs/meta-atlas-sdk/MetaAtlasCore/routing-core/routeLayers.js.map +1 -1
  23. package/lib/cjs/meta-atlas-sdk/MetaAtlasCore/routing-core/routing-helpers.js +546 -620
  24. package/lib/cjs/meta-atlas-sdk/MetaAtlasCore/routing-core/routing-helpers.js.map +1 -1
  25. package/lib/cjs/meta-atlas-sdk/MetaAtlasCore/routing-core/utils.js +155 -160
  26. package/lib/cjs/meta-atlas-sdk/MetaAtlasCore/routing-core/utils.js.map +1 -1
  27. package/lib/cjs/meta-atlas-sdk/customStyles.js +2 -2
  28. package/lib/cjs/meta-atlas-sdk/customStyles.js.map +1 -1
  29. package/lib/cjs/meta-atlas-sdk/customerLayer.js +15 -29
  30. package/lib/cjs/meta-atlas-sdk/customerLayer.js.map +1 -1
  31. package/lib/cjs/meta-atlas-sdk/customerLayerVariant.js +5 -5
  32. package/lib/cjs/meta-atlas-sdk/customerLayerVariant.js.map +1 -1
  33. package/lib/cjs/meta-atlas-sdk/meta-atlas-sdk.js +832 -1060
  34. package/lib/cjs/meta-atlas-sdk/meta-atlas-sdk.js.map +1 -1
  35. package/lib/cjs/meta-atlas-sdk/utils/helpers.js +33 -50
  36. package/lib/cjs/meta-atlas-sdk/utils/helpers.js.map +1 -1
  37. package/lib/cjs/meta-atlas-sdk/utils/local-storage.js +18 -36
  38. package/lib/cjs/meta-atlas-sdk/utils/local-storage.js.map +1 -1
  39. package/lib/cjs/meta-atlas-sdk/utils/mapobjects-store.js +6 -6
  40. package/lib/cjs/meta-atlas-sdk/utils/mapobjects-store.js.map +1 -1
  41. package/lib/cjs/meta-atlas-sdk/utils/routing-store.js +6 -6
  42. package/lib/cjs/meta-atlas-sdk/utils/routing-store.js.map +1 -1
  43. package/lib/cjs/meta-atlas-sdk/utils/routing-visualizer/index.js +428 -556
  44. package/lib/cjs/meta-atlas-sdk/utils/routing-visualizer/index.js.map +1 -1
  45. package/lib/cjs/react/MetaAtlasMap.js +127 -0
  46. package/lib/cjs/react/MetaAtlasMap.js.map +1 -0
  47. package/lib/cjs/react/hooks/useDrawing/index.js +17 -18
  48. package/lib/cjs/react/hooks/useDrawing/index.js.map +1 -1
  49. package/lib/cjs/react/hooks/useFocus/index.js +48 -55
  50. package/lib/cjs/react/hooks/useFocus/index.js.map +1 -1
  51. package/lib/cjs/react/hooks/useMapEvents/index.js +40 -50
  52. package/lib/cjs/react/hooks/useMapEvents/index.js.map +1 -1
  53. package/lib/cjs/react/hooks/useMapOverlays/index.js +20 -21
  54. package/lib/cjs/react/hooks/useMapOverlays/index.js.map +1 -1
  55. package/lib/cjs/react/hooks/useMetaAtlas/index.js +77 -95
  56. package/lib/cjs/react/hooks/useMetaAtlas/index.js.map +1 -1
  57. package/lib/cjs/react/hooks/useMetaAtlas.js +78 -96
  58. package/lib/cjs/react/hooks/useMetaAtlas.js.map +1 -1
  59. package/lib/cjs/react/hooks/useRouting/index.js +21 -20
  60. package/lib/cjs/react/hooks/useRouting/index.js.map +1 -1
  61. package/lib/cjs/react/hooks/useSearch/index.js +35 -34
  62. package/lib/cjs/react/hooks/useSearch/index.js.map +1 -1
  63. package/lib/cjs/react/hooks/useStampRally/index.js +30 -29
  64. package/lib/cjs/react/hooks/useStampRally/index.js.map +1 -1
  65. package/lib/cjs/react/hooks/useStampRally/utils.js +2 -2
  66. package/lib/cjs/react/hooks/useStampRally/utils.js.map +1 -1
  67. package/lib/cjs/react/index.js +31 -31
  68. package/lib/cjs/react/index.js.map +1 -1
  69. package/lib/cjs/react/stores/useMapDataStore.js +53 -64
  70. package/lib/cjs/react/stores/useMapDataStore.js.map +1 -1
  71. package/lib/cjs/react/stores/useMetaAtlasStore.js +27 -40
  72. package/lib/cjs/react/stores/useMetaAtlasStore.js.map +1 -1
  73. package/lib/esm/index.js +3 -7
  74. package/lib/esm/index.js.map +1 -1
  75. package/lib/esm/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/CustomThreeJsWrapper.js +2 -1
  76. package/lib/esm/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/CustomThreeJsWrapper.js.map +1 -1
  77. package/lib/esm/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/utility/utils.js +10 -9
  78. package/lib/esm/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/utility/utils.js.map +1 -1
  79. package/lib/esm/meta-atlas-sdk/3DMap/MainMap.js +2 -2
  80. package/lib/esm/meta-atlas-sdk/3DMap/MainMap.js.map +1 -1
  81. package/lib/esm/meta-atlas-sdk/MetaAtlasCore/fetch-published-json.js +3 -3
  82. package/lib/esm/meta-atlas-sdk/MetaAtlasCore/fetch-published-json.js.map +1 -1
  83. package/lib/esm/meta-atlas-sdk/MetaAtlasCore/fetchMapObjectsData.js +4 -3
  84. package/lib/esm/meta-atlas-sdk/MetaAtlasCore/fetchMapObjectsData.js.map +1 -1
  85. package/lib/esm/meta-atlas-sdk/MetaAtlasCore/meta-atlas-sdk-core.js +22 -14
  86. package/lib/esm/meta-atlas-sdk/MetaAtlasCore/meta-atlas-sdk-core.js.map +1 -1
  87. package/lib/esm/meta-atlas-sdk/MetaAtlasCore/routing-core/index.js +8 -8
  88. package/lib/esm/meta-atlas-sdk/MetaAtlasCore/routing-core/index.js.map +1 -1
  89. package/lib/esm/meta-atlas-sdk/MetaAtlasCore/routing-core/mapObjectsHelper.js +3 -3
  90. package/lib/esm/meta-atlas-sdk/MetaAtlasCore/routing-core/mapObjectsHelper.js.map +1 -1
  91. package/lib/esm/meta-atlas-sdk/MetaAtlasCore/routing-core/routing-helpers.js +18 -11
  92. package/lib/esm/meta-atlas-sdk/MetaAtlasCore/routing-core/routing-helpers.js.map +1 -1
  93. package/lib/esm/meta-atlas-sdk/MetaAtlasCore/routing-core/utils.js +4 -3
  94. package/lib/esm/meta-atlas-sdk/MetaAtlasCore/routing-core/utils.js.map +1 -1
  95. package/lib/esm/meta-atlas-sdk/customerLayer.js +4 -1
  96. package/lib/esm/meta-atlas-sdk/customerLayer.js.map +1 -1
  97. package/lib/esm/meta-atlas-sdk/meta-atlas-sdk.js +80 -61
  98. package/lib/esm/meta-atlas-sdk/meta-atlas-sdk.js.map +1 -1
  99. package/lib/esm/meta-atlas-sdk/utils/helpers.js +3 -1
  100. package/lib/esm/meta-atlas-sdk/utils/helpers.js.map +1 -1
  101. package/lib/esm/meta-atlas-sdk/utils/routing-visualizer/index.js +19 -15
  102. package/lib/esm/meta-atlas-sdk/utils/routing-visualizer/index.js.map +1 -1
  103. package/lib/esm/react/MetaAtlasMap.js +120 -0
  104. package/lib/esm/react/MetaAtlasMap.js.map +1 -0
  105. package/lib/esm/react/hooks/useDrawing/index.js +2 -2
  106. package/lib/esm/react/hooks/useDrawing/index.js.map +1 -1
  107. package/lib/esm/react/hooks/useFocus/index.js +4 -3
  108. package/lib/esm/react/hooks/useFocus/index.js.map +1 -1
  109. package/lib/esm/react/hooks/useMapEvents/index.js +3 -3
  110. package/lib/esm/react/hooks/useMapEvents/index.js.map +1 -1
  111. package/lib/esm/react/hooks/useMapOverlays/index.js +2 -2
  112. package/lib/esm/react/hooks/useMapOverlays/index.js.map +1 -1
  113. package/lib/esm/react/hooks/useMetaAtlas/index.js +162 -60
  114. package/lib/esm/react/hooks/useMetaAtlas/index.js.map +1 -1
  115. package/lib/esm/react/hooks/useMetaAtlas.js +162 -60
  116. package/lib/esm/react/hooks/useMetaAtlas.js.map +1 -1
  117. package/lib/esm/react/hooks/useRouting/index.js +2 -2
  118. package/lib/esm/react/hooks/useRouting/index.js.map +1 -1
  119. package/lib/esm/react/hooks/useSearch/index.js +2 -2
  120. package/lib/esm/react/hooks/useSearch/index.js.map +1 -1
  121. package/lib/esm/react/hooks/useStampRally/index.js +8 -7
  122. package/lib/esm/react/hooks/useStampRally/index.js.map +1 -1
  123. package/lib/esm/react/index.js +11 -15
  124. package/lib/esm/react/index.js.map +1 -1
  125. 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 './customStyles';
12
- import DrawMarker from './mapbox_draw_custom_modes/draw_marker';
13
- import MarkerSelect from './mapbox_draw_custom_modes/marker_select';
14
- import { MetaAtlasCore } from './MetaAtlasCore/meta-atlas-sdk-core';
15
- import MainMap from './3DMap/MainMap';
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 './utils/routing-visualizer';
19
- import CustomerLayer from './customerLayer';
20
- import CustomerLayerVariant from './customerLayerVariant';
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, onLoad = () => {}, onLoadFail = errorMessage => {}, onRoutingStatusUpdate = () => {}, onSearchStatusUpdate = () => {}) {
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(id = null, where = null, geom = null, props = null) {
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, replaceLast = true) {
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(pinId = '-1') {
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(pinId = '-1') {
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(pinId = '-1') {
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, moveCamera = true) {
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, geomType = '') {
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(defaultFloor = {}) {
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(...args) {
692
- return this.metaAtlasCore.getMapObjectsByFilteredLocalRef(...args);
706
+ getMapObjectsByFilteredLocalRef() {
707
+ return this.metaAtlasCore.getMapObjectsByFilteredLocalRef(...arguments);
693
708
  }
694
- getMapObjectsByName(...args) {
695
- return this.metaAtlasCore.getMapObjectsByName(...args);
709
+ getMapObjectsByName() {
710
+ return this.metaAtlasCore.getMapObjectsByName(...arguments);
696
711
  }
697
- getMapObjectById(...args) {
698
- return this.metaAtlasCore.getMapObjectById(...args);
712
+ getMapObjectById() {
713
+ return this.metaAtlasCore.getMapObjectById(...arguments);
699
714
  }
700
- getMapObjectByLocalRef(...args) {
701
- return this.metaAtlasCore.getMapObjectByLocalRef(...args);
715
+ getMapObjectByLocalRef() {
716
+ return this.metaAtlasCore.getMapObjectByLocalRef(...arguments);
702
717
  }
703
- getMapObjectMatchingLocalRef(...args) {
704
- return this.metaAtlasCore.getMapObjectMatchingLocalRef(...args);
718
+ getMapObjectMatchingLocalRef() {
719
+ return this.metaAtlasCore.getMapObjectMatchingLocalRef(...arguments);
705
720
  }
706
- getMapObjectsMatchingLocalRefs(...args) {
707
- return this.metaAtlasCore.getMapObjectsMatchingLocalRefs(...args);
721
+ getMapObjectsMatchingLocalRefs() {
722
+ return this.metaAtlasCore.getMapObjectsMatchingLocalRefs(...arguments);
708
723
  }
709
- getMapObjectsByWhatTaxonomy(...args) {
710
- return this.metaAtlasCore.getMapObjectsByWhatTaxonomy(...args);
724
+ getMapObjectsByWhatTaxonomy() {
725
+ return this.metaAtlasCore.getMapObjectsByWhatTaxonomy(...arguments);
711
726
  }
712
- getMapObjectsByWhatTaxonomyAPI(...args) {
713
- return this.metaAtlasCore.getMapObjectsByWhatTaxonomyAPI(...args);
727
+ getMapObjectsByWhatTaxonomyAPI() {
728
+ return this.metaAtlasCore.getMapObjectsByWhatTaxonomyAPI(...arguments);
714
729
  }
715
- getMapObjectsByWhereTaxonomy(...args) {
716
- return this.metaAtlasCore.getMapObjectsByWhereTaxonomy(...args);
730
+ getMapObjectsByWhereTaxonomy() {
731
+ return this.metaAtlasCore.getMapObjectsByWhereTaxonomy(...arguments);
717
732
  }
718
- getMapObjectsByWhatAndWhereTaxonomy(...args) {
719
- return this.metaAtlasCore.getMapObjectsByWhatAndWhereTaxonomy(...args);
733
+ getMapObjectsByWhatAndWhereTaxonomy() {
734
+ return this.metaAtlasCore.getMapObjectsByWhatAndWhereTaxonomy(...arguments);
720
735
  }
721
- getMapObjectsInWhatTaxonomy(...args) {
722
- return this.metaAtlasCore.getMapObjectsInWhatTaxonomy(...args);
736
+ getMapObjectsInWhatTaxonomy() {
737
+ return this.metaAtlasCore.getMapObjectsInWhatTaxonomy(...arguments);
723
738
  }
724
- getMapObjectsInWhereTaxonomy(...args) {
725
- return this.metaAtlasCore.getMapObjectsInWhereTaxonomy(...args);
739
+ getMapObjectsInWhereTaxonomy() {
740
+ return this.metaAtlasCore.getMapObjectsInWhereTaxonomy(...arguments);
726
741
  }
727
742
 
728
743
  // Routing
729
- computeRoute(...args) {
730
- return this.routingVisualizer.computeRoute(...args);
744
+ computeRoute() {
745
+ return this.routingVisualizer.computeRoute(...arguments);
731
746
  }
732
- computeRoutes(mapObjectIds, wheelChairAccessibleRouteOnly = false, source) {
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(...args) {
763
- return this.routingVisualizer.setActiveRoute(...args);
779
+ setActiveRoute() {
780
+ return this.routingVisualizer.setActiveRoute(...arguments);
764
781
  }
765
- getActiveRoute(...args) {
766
- return this.routingVisualizer.getActiveRoute(...args);
782
+ getActiveRoute() {
783
+ return this.routingVisualizer.getActiveRoute(...arguments);
767
784
  }
768
- highlightRouteSegment(...args) {
769
- return this.routingVisualizer.highlightRouteSegment(...args);
785
+ highlightRouteSegment() {
786
+ return this.routingVisualizer.highlightRouteSegment(...arguments);
770
787
  }
771
- clearRoute(...args) {
772
- return this.routingVisualizer.clearRoute(...args);
788
+ clearRoute() {
789
+ return this.routingVisualizer.clearRoute(...arguments);
773
790
  }
774
791
 
775
792
  // Drawing
776
- drawGeometryOnMap(type, onDrawEnd, onlyVisibleAtCurrentFocus = false) {
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, options = {
917
- units: 'kilometers'
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') {