@map-colonies/react-components 3.8.1 → 3.10.2

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 (231) hide show
  1. package/.env +1 -0
  2. package/.storybook/main.js +2 -5
  3. package/CHANGELOG.md +54 -0
  4. package/dist/assets/img/dragIcon.png +0 -0
  5. package/dist/assets/img/dragIconLight.png +0 -0
  6. package/dist/assets/img/glyphicons_067_cleaning.png +0 -0
  7. package/dist/assets/img/glyphicons_094_vector_path_square.png +0 -0
  8. package/dist/assets/img/glyphicons_095_vector_path_circle.png +0 -0
  9. package/dist/assets/img/glyphicons_096_vector_path_polygon.png +0 -0
  10. package/dist/assets/img/glyphicons_097_vector_path_line.png +0 -0
  11. package/dist/assets/img/glyphicons_242_google_maps.png +0 -0
  12. package/dist/assets/img/map-marker.gif +0 -0
  13. package/dist/autocomplete/autocomplete.css +25 -0
  14. package/dist/autocomplete/autocomplete.d.ts +33 -0
  15. package/dist/autocomplete/autocomplete.js +480 -0
  16. package/dist/autocomplete/index.d.ts +1 -0
  17. package/dist/autocomplete/index.js +5 -0
  18. package/dist/box/box.d.ts +3 -0
  19. package/dist/box/box.js +35 -0
  20. package/dist/box/index.d.ts +1 -0
  21. package/dist/box/index.js +5 -0
  22. package/dist/cesium-map/data-sources/custom.data-source.d.ts +5 -0
  23. package/dist/cesium-map/data-sources/custom.data-source.js +23 -0
  24. package/dist/cesium-map/data-sources/drawings.data-source.d.ts +34 -0
  25. package/dist/cesium-map/data-sources/drawings.data-source.js +187 -0
  26. package/dist/cesium-map/data-sources/index.d.ts +2 -0
  27. package/dist/cesium-map/data-sources/index.js +14 -0
  28. package/dist/cesium-map/entities/entity.d.ts +5 -0
  29. package/dist/cesium-map/entities/entity.description.d.ts +6 -0
  30. package/dist/cesium-map/entities/entity.description.js +27 -0
  31. package/dist/cesium-map/entities/entity.js +23 -0
  32. package/dist/cesium-map/entities/graphics/polygon.graphics.d.ts +5 -0
  33. package/dist/cesium-map/entities/graphics/polygon.graphics.js +23 -0
  34. package/dist/cesium-map/entities/graphics/polyline.graphics.d.ts +5 -0
  35. package/dist/cesium-map/entities/graphics/polyline.graphics.js +23 -0
  36. package/dist/cesium-map/entities/graphics/rectangle.graphics.d.ts +5 -0
  37. package/dist/cesium-map/entities/graphics/rectangle.graphics.js +23 -0
  38. package/dist/cesium-map/entities/index.d.ts +4 -0
  39. package/dist/cesium-map/entities/index.js +16 -0
  40. package/dist/cesium-map/index.d.ts +7 -0
  41. package/dist/cesium-map/index.js +19 -0
  42. package/dist/cesium-map/layers/3d.tileset.d.ts +7 -0
  43. package/dist/cesium-map/layers/3d.tileset.js +39 -0
  44. package/dist/cesium-map/layers/3d.tileset.update.d.ts +1 -0
  45. package/dist/cesium-map/layers/3d.tileset.update.js +5 -0
  46. package/dist/cesium-map/layers/geojson.layer.d.ts +5 -0
  47. package/dist/cesium-map/layers/geojson.layer.js +23 -0
  48. package/dist/cesium-map/layers/imagery.layer.d.ts +6 -0
  49. package/dist/cesium-map/layers/imagery.layer.js +64 -0
  50. package/dist/cesium-map/layers/index.d.ts +7 -0
  51. package/dist/cesium-map/layers/index.js +19 -0
  52. package/dist/cesium-map/layers/osm.layer.d.ts +9 -0
  53. package/dist/cesium-map/layers/osm.layer.js +36 -0
  54. package/dist/cesium-map/layers/wms.layer.d.ts +9 -0
  55. package/dist/cesium-map/layers/wms.layer.js +36 -0
  56. package/dist/cesium-map/layers/wmts.layer.d.ts +9 -0
  57. package/dist/cesium-map/layers/wmts.layer.js +36 -0
  58. package/dist/cesium-map/layers/xyz.layer.d.ts +9 -0
  59. package/dist/cesium-map/layers/xyz.layer.js +36 -0
  60. package/dist/cesium-map/layers-manager.d.ts +47 -0
  61. package/dist/cesium-map/layers-manager.js +228 -0
  62. package/dist/cesium-map/map.css +54 -0
  63. package/dist/cesium-map/map.d.ts +46 -0
  64. package/dist/cesium-map/map.js +273 -0
  65. package/dist/cesium-map/map.types.d.ts +8 -0
  66. package/dist/cesium-map/map.types.js +12 -0
  67. package/dist/cesium-map/proxied.types.d.ts +19 -0
  68. package/dist/cesium-map/proxied.types.js +89 -0
  69. package/dist/cesium-map/settings/base-maps.css +37 -0
  70. package/dist/cesium-map/settings/base-maps.d.ts +7 -0
  71. package/dist/cesium-map/settings/base-maps.js +78 -0
  72. package/dist/cesium-map/settings/scene-modes.css +19 -0
  73. package/dist/cesium-map/settings/scene-modes.d.ts +7 -0
  74. package/dist/cesium-map/settings/scene-modes.js +65 -0
  75. package/dist/cesium-map/settings/settings.css +49 -0
  76. package/dist/cesium-map/settings/settings.d.ts +23 -0
  77. package/dist/cesium-map/settings/settings.js +79 -0
  78. package/dist/cesium-map/terrain-providers/custom/dummy-quantized-mesh-tile.d.ts +3 -0
  79. package/dist/cesium-map/terrain-providers/custom/dummy-quantized-mesh-tile.js +245 -0
  80. package/dist/cesium-map/terrain-providers/custom/quantized-mesh-decoder.d.ts +9 -0
  81. package/dist/cesium-map/terrain-providers/custom/quantized-mesh-decoder.js +202 -0
  82. package/dist/cesium-map/terrain-providers/custom/quantized-mesh-terrain-provider.d.ts +50 -0
  83. package/dist/cesium-map/terrain-providers/custom/quantized-mesh-terrain-provider.js +136 -0
  84. package/dist/cesium-map/tools/cesium/primitives-conversions.cesium.d.ts +2 -0
  85. package/dist/cesium-map/tools/cesium/primitives-conversions.cesium.js +38 -0
  86. package/dist/cesium-map/tools/coordinates-tracker.tool.css +11 -0
  87. package/dist/cesium-map/tools/coordinates-tracker.tool.d.ts +7 -0
  88. package/dist/cesium-map/tools/coordinates-tracker.tool.js +78 -0
  89. package/dist/cesium-map/tools/draw/drawHelper.css +101 -0
  90. package/dist/cesium-map/tools/draw/drawHelper.d.ts +28 -0
  91. package/dist/cesium-map/tools/draw/drawHelper.js +1694 -0
  92. package/dist/cesium-map/tools/geojson/geojson-to-primitive.d.ts +4 -0
  93. package/dist/cesium-map/tools/geojson/geojson-to-primitive.js +41 -0
  94. package/dist/cesium-map/tools/geojson/index.d.ts +2 -0
  95. package/dist/cesium-map/tools/geojson/index.js +14 -0
  96. package/dist/cesium-map/tools/geojson/point.geojson.d.ts +3 -0
  97. package/dist/cesium-map/tools/geojson/point.geojson.js +21 -0
  98. package/dist/cesium-map/tools/geojson/polygon.geojson.d.ts +3 -0
  99. package/dist/cesium-map/tools/geojson/polygon.geojson.js +24 -0
  100. package/dist/cesium-map/tools/geojson/rectangle.geojson.d.ts +3 -0
  101. package/dist/cesium-map/tools/geojson/rectangle.geojson.js +44 -0
  102. package/dist/cesium-map/tools/inspector.tool.d.ts +4 -0
  103. package/dist/cesium-map/tools/inspector.tool.js +33 -0
  104. package/dist/cesium-map/tools/scale-tracker.tool.css +16 -0
  105. package/dist/cesium-map/tools/scale-tracker.tool.d.ts +8 -0
  106. package/dist/cesium-map/tools/scale-tracker.tool.js +158 -0
  107. package/dist/cesium-map/tools/terranian-height.tool.d.ts +4 -0
  108. package/dist/cesium-map/tools/terranian-height.tool.js +113 -0
  109. package/dist/cssbaseline/cssbaseline.d.ts +5 -0
  110. package/dist/cssbaseline/cssbaseline.js +41 -0
  111. package/dist/cssbaseline/index.d.ts +1 -0
  112. package/dist/cssbaseline/index.js +6 -0
  113. package/dist/date-picker/date-picker.css +9 -0
  114. package/dist/date-picker/date-picker.d.ts +14 -0
  115. package/dist/date-picker/date-picker.js +78 -0
  116. package/dist/date-picker/index.d.ts +1 -0
  117. package/dist/date-picker/index.js +13 -0
  118. package/dist/date-range-picker/date-range-picker.css +9 -0
  119. package/dist/date-range-picker/date-range-picker.d.ts +26 -0
  120. package/dist/date-range-picker/date-range-picker.form-control.css +3 -0
  121. package/dist/date-range-picker/date-range-picker.form-control.d.ts +28 -0
  122. package/dist/date-range-picker/date-range-picker.form-control.js +95 -0
  123. package/dist/date-range-picker/date-range-picker.js +104 -0
  124. package/dist/date-range-picker/index.d.ts +2 -0
  125. package/dist/date-range-picker/index.js +14 -0
  126. package/dist/file-picker/file-picker.css +62 -0
  127. package/dist/file-picker/file-picker.d.ts +276 -0
  128. package/dist/file-picker/file-picker.js +151 -0
  129. package/dist/file-picker/fs-map.json +1557 -0
  130. package/dist/file-picker/index.d.ts +2 -0
  131. package/dist/file-picker/index.js +14 -0
  132. package/dist/file-picker/localization.d.ts +11 -0
  133. package/dist/file-picker/localization.js +124 -0
  134. package/dist/index.d.ts +13 -0
  135. package/dist/index.js +23 -16
  136. package/dist/map-filter-container/container-map.css +5 -0
  137. package/dist/map-filter-container/container-map.d.ts +11 -0
  138. package/dist/map-filter-container/container-map.js +31 -0
  139. package/dist/map-filter-container/index.d.ts +1 -0
  140. package/dist/map-filter-container/index.js +13 -0
  141. package/dist/map-filter-container/map-filter-container.d.ts +9 -0
  142. package/dist/map-filter-container/map-filter-container.js +78 -0
  143. package/dist/map-filter-container/polygon-selection-ui.d.ts +12 -0
  144. package/dist/map-filter-container/polygon-selection-ui.js +62 -0
  145. package/dist/models/defaults.d.ts +28 -0
  146. package/dist/models/defaults.js +32 -0
  147. package/dist/models/enums.d.ts +14 -0
  148. package/dist/models/enums.js +20 -0
  149. package/dist/models/index.d.ts +1 -0
  150. package/dist/models/index.js +13 -0
  151. package/dist/ol-map/feature.d.ts +6 -0
  152. package/dist/ol-map/feature.js +20 -0
  153. package/dist/ol-map/index.d.ts +6 -0
  154. package/dist/ol-map/index.js +18 -0
  155. package/dist/ol-map/interactions/draw.d.ts +8 -0
  156. package/dist/ol-map/interactions/draw.js +44 -0
  157. package/dist/ol-map/interactions/index.d.ts +1 -0
  158. package/dist/ol-map/interactions/index.js +13 -0
  159. package/dist/ol-map/layers/index.d.ts +3 -0
  160. package/dist/ol-map/layers/index.js +15 -0
  161. package/dist/ol-map/layers/tile-layer.d.ts +9 -0
  162. package/dist/ol-map/layers/tile-layer.js +48 -0
  163. package/dist/ol-map/layers/vector-layer.d.ts +4 -0
  164. package/dist/ol-map/layers/vector-layer.js +48 -0
  165. package/dist/ol-map/layers/vector-tile-layer.d.ts +10 -0
  166. package/dist/ol-map/layers/vector-tile-layer.js +66 -0
  167. package/dist/ol-map/map.css +17 -0
  168. package/dist/ol-map/map.d.ts +14 -0
  169. package/dist/ol-map/map.js +117 -0
  170. package/dist/ol-map/source/index.d.ts +6 -0
  171. package/dist/ol-map/source/index.js +18 -0
  172. package/dist/ol-map/source/mvt.d.ts +11 -0
  173. package/dist/ol-map/source/mvt.js +37 -0
  174. package/dist/ol-map/source/osm.d.ts +2 -0
  175. package/dist/ol-map/source/osm.js +14 -0
  176. package/dist/ol-map/source/vector-source.d.ts +4 -0
  177. package/dist/ol-map/source/vector-source.js +45 -0
  178. package/dist/ol-map/source/wms.d.ts +17 -0
  179. package/dist/ol-map/source/wms.js +30 -0
  180. package/dist/ol-map/source/wmts.d.ts +21 -0
  181. package/dist/ol-map/source/wmts.js +59 -0
  182. package/dist/ol-map/source/xyz.d.ts +12 -0
  183. package/dist/ol-map/source/xyz.js +27 -0
  184. package/dist/ol-map/style.d.ts +4 -0
  185. package/dist/ol-map/style.js +22 -0
  186. package/dist/popover/index.d.ts +1 -0
  187. package/dist/popover/index.js +5 -0
  188. package/dist/popover/popover.d.ts +3 -0
  189. package/dist/popover/popover.js +35 -0
  190. package/dist/smart-table/__mock-data__/smartTableMocks.d.ts +7 -0
  191. package/dist/smart-table/__mock-data__/smartTableMocks.js +17 -0
  192. package/dist/smart-table/index.d.ts +2 -0
  193. package/dist/smart-table/index.js +14 -0
  194. package/dist/smart-table/smart-table-head.d.ts +11 -0
  195. package/dist/smart-table/smart-table-head.js +22 -0
  196. package/dist/smart-table/smart-table-row.d.ts +12 -0
  197. package/dist/smart-table/smart-table-row.js +46 -0
  198. package/dist/smart-table/smart-table-types.d.ts +9 -0
  199. package/dist/smart-table/smart-table-types.js +2 -0
  200. package/dist/smart-table/smart-table.d.ts +17 -0
  201. package/dist/smart-table/smart-table.js +51 -0
  202. package/dist/theme/index.d.ts +1 -0
  203. package/dist/theme/index.js +13 -0
  204. package/dist/theme/theme.d.ts +8 -0
  205. package/dist/theme/theme.js +124 -0
  206. package/dist/utils/map.d.ts +3 -0
  207. package/dist/utils/map.js +21 -0
  208. package/dist/utils/projections.d.ts +6 -0
  209. package/dist/utils/projections.js +10 -0
  210. package/dist/utils/story.d.ts +12 -0
  211. package/dist/utils/story.js +2 -0
  212. package/package.json +103 -100
  213. package/public/assets/img/map-marker.gif +0 -0
  214. package/src/lib/cesium-map/map.tsx +22 -12
  215. package/src/lib/cesium-map/terrain-providers/terrain-provider-heights-tool.stories.tsx +155 -0
  216. package/src/lib/cesium-map/terrain-providers/terrain-provider.stories.tsx +5 -3
  217. package/src/lib/cesium-map/tools/coordinates-tracker.tool.tsx +1 -1
  218. package/src/lib/cesium-map/tools/inspector.tool.tsx +15 -0
  219. package/src/lib/cesium-map/tools/terranian-height.tool.tsx +167 -0
  220. package/src/lib/date-range-picker/{stories/DateRangePicker.stories.tsx → date-range-picker.stories.tsx} +5 -5
  221. package/src/lib/file-picker/file-picker.css +62 -0
  222. package/src/lib/file-picker/file-picker.stories.tsx +447 -0
  223. package/src/lib/file-picker/file-picker.tsx +180 -0
  224. package/src/lib/file-picker/fs-map.json +1557 -0
  225. package/src/lib/file-picker/index.ts +2 -0
  226. package/src/lib/file-picker/localization.ts +164 -0
  227. package/src/lib/index.ts +1 -0
  228. package/src/lib/models/enums.ts +1 -0
  229. package/src/lib/smart-table/smart-table-row.spec.tsx +1 -1
  230. package/tsbuildconfig.json +2 -2
  231. package/tsconfig.json +2 -1
@@ -0,0 +1,273 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ var __assign = (this && this.__assign) || function () {
18
+ __assign = Object.assign || function(t) {
19
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
20
+ s = arguments[i];
21
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
22
+ t[p] = s[p];
23
+ }
24
+ return t;
25
+ };
26
+ return __assign.apply(this, arguments);
27
+ };
28
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
29
+ if (k2 === undefined) k2 = k;
30
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
31
+ }) : (function(o, m, k, k2) {
32
+ if (k2 === undefined) k2 = k;
33
+ o[k2] = m[k];
34
+ }));
35
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
36
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
37
+ }) : function(o, v) {
38
+ o["default"] = v;
39
+ });
40
+ var __importStar = (this && this.__importStar) || function (mod) {
41
+ if (mod && mod.__esModule) return mod;
42
+ var result = {};
43
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
44
+ __setModuleDefault(result, mod);
45
+ return result;
46
+ };
47
+ var __importDefault = (this && this.__importDefault) || function (mod) {
48
+ return (mod && mod.__esModule) ? mod : { "default": mod };
49
+ };
50
+ Object.defineProperty(exports, "__esModule", { value: true });
51
+ exports.CesiumMap = exports.useCesiumMap = exports.CesiumViewer = void 0;
52
+ var react_1 = __importStar(require("react"));
53
+ var resium_1 = require("resium");
54
+ var cesium_1 = require("cesium");
55
+ var lodash_1 = require("lodash");
56
+ var map_1 = require("../utils/map");
57
+ var box_1 = require("../box");
58
+ var projections_1 = require("../utils/projections");
59
+ var coordinates_tracker_tool_1 = require("./tools/coordinates-tracker.tool");
60
+ var scale_tracker_tool_1 = require("./tools/scale-tracker.tool");
61
+ var settings_1 = require("./settings/settings");
62
+ var layers_manager_1 = __importDefault(require("./layers-manager"));
63
+ var map_types_1 = require("./map.types");
64
+ require("./map.css");
65
+ var DEFAULT_HEIGHT = 212;
66
+ var DEFAULT_WIDTH = 260;
67
+ var DEFAULT_DYNAMIC_HEIGHT_INCREMENT = 0;
68
+ var CesiumViewer = /** @class */ (function (_super) {
69
+ __extends(CesiumViewer, _super);
70
+ function CesiumViewer(container, options) {
71
+ return _super.call(this, container, options) || this;
72
+ }
73
+ return CesiumViewer;
74
+ }(cesium_1.Viewer));
75
+ exports.CesiumViewer = CesiumViewer;
76
+ var mapContext = react_1.createContext(null);
77
+ var MapViewProvider = mapContext.Provider;
78
+ var cameraPositionRefreshRate = 10000;
79
+ var useCesiumMap = function () {
80
+ var mapViewer = react_1.useContext(mapContext);
81
+ if (mapViewer === null) {
82
+ throw new Error('map context is null, please check the provider');
83
+ }
84
+ return mapViewer;
85
+ };
86
+ exports.useCesiumMap = useCesiumMap;
87
+ var CesiumMap = function (props) {
88
+ var _a, _b, _c, _d, _e, _f, _g, _h;
89
+ var ref = react_1.useRef(null);
90
+ var _j = react_1.useState(), mapViewRef = _j[0], setMapViewRef = _j[1];
91
+ var _k = react_1.useState(), projection = _k[0], setProjection = _k[1];
92
+ var _l = react_1.useState(), showMousePosition = _l[0], setShowMousePosition = _l[1];
93
+ var _m = react_1.useState(), showScale = _m[0], setShowScale = _m[1];
94
+ var _o = react_1.useState(), locale = _o[0], setLocale = _o[1];
95
+ var _p = react_1.useState(), cameraState = _p[0], setCameraState = _p[1];
96
+ var _q = react_1.useState(), sceneModes = _q[0], setSceneModes = _q[1];
97
+ var _r = react_1.useState(), baseMaps = _r[0], setBaseMaps = _r[1];
98
+ var _s = react_1.useState(false), showImageryMenu = _s[0], setShowImageryMenu = _s[1];
99
+ var _t = react_1.useState(undefined), imageryMenuPosition = _t[0], setImageryMenuPosition = _t[1];
100
+ var viewerProps = __assign({ fullscreenButton: true, timeline: false, animation: false, baseLayerPicker: false, geocoder: false, navigationHelpButton: false, homeButton: false, sceneModePicker: false }, props);
101
+ var getImageryMenuStyle = function (x, y, menuWidth, menuHeight, menuDynamicHeightIncrement) {
102
+ var container = mapViewRef.container;
103
+ var mapWidth = container.clientWidth;
104
+ var mapHeight = container.clientHeight;
105
+ var calculatedHeight = menuHeight + menuDynamicHeightIncrement;
106
+ return {
107
+ left: (mapWidth - x < menuWidth ? x - (menuWidth - (mapWidth - x)) : x) + "px",
108
+ top: (mapHeight - y < calculatedHeight
109
+ ? y - (calculatedHeight - (mapHeight - y))
110
+ : y) + "px",
111
+ };
112
+ };
113
+ react_1.useEffect(function () {
114
+ var _a;
115
+ if (ref.current) {
116
+ var viewer = ref.current.cesiumElement;
117
+ viewer.layersManager = new layers_manager_1.default(viewer);
118
+ if (props.imageryContextMenu) {
119
+ viewer.screenSpaceEventHandler.setInputAction(function (evt) {
120
+ // console.log('RIGHT click', evt.position);
121
+ setShowImageryMenu(false);
122
+ setImageryMenuPosition(evt.position);
123
+ setShowImageryMenu(true);
124
+ }, cesium_1.ScreenSpaceEventType.RIGHT_CLICK);
125
+ }
126
+ }
127
+ setMapViewRef((_a = ref.current) === null || _a === void 0 ? void 0 : _a.cesiumElement);
128
+ }, [ref, props.imageryContextMenu]);
129
+ react_1.useEffect(function () {
130
+ var _a;
131
+ setSceneModes((_a = props.sceneModes) !== null && _a !== void 0 ? _a : [
132
+ map_types_1.CesiumSceneMode.SCENE2D,
133
+ map_types_1.CesiumSceneMode.SCENE3D,
134
+ map_types_1.CesiumSceneMode.COLUMBUS_VIEW,
135
+ ]);
136
+ }, [props.sceneModes]);
137
+ react_1.useEffect(function () {
138
+ var _a, _b;
139
+ setBaseMaps(props.baseMaps);
140
+ var currentMap = (_a = props.baseMaps) === null || _a === void 0 ? void 0 : _a.maps.find(function (map) { return map.isCurrent; });
141
+ if (currentMap && mapViewRef) {
142
+ (_b = mapViewRef.layersManager) === null || _b === void 0 ? void 0 : _b.setBaseMapLayers(currentMap);
143
+ }
144
+ }, [props.baseMaps, mapViewRef]);
145
+ react_1.useEffect(function () {
146
+ var _a;
147
+ setProjection((_a = props.projection) !== null && _a !== void 0 ? _a : projections_1.Proj.WGS84);
148
+ }, [props.projection]);
149
+ react_1.useEffect(function () {
150
+ setLocale(props.locale);
151
+ }, [props.locale]);
152
+ react_1.useEffect(function () {
153
+ var _a;
154
+ setShowMousePosition((_a = props.showMousePosition) !== null && _a !== void 0 ? _a : true);
155
+ }, [props.showMousePosition]);
156
+ react_1.useEffect(function () {
157
+ var _a;
158
+ setShowScale((_a = props.showScale) !== null && _a !== void 0 ? _a : true);
159
+ }, [props.showScale]);
160
+ react_1.useEffect(function () {
161
+ var getCameraPosition = function () {
162
+ if (mapViewRef === undefined) {
163
+ return {
164
+ longitude: 0,
165
+ latitude: 0,
166
+ height: 0,
167
+ };
168
+ }
169
+ var getCameraPositionCartographic = function () {
170
+ var camPos = mapViewRef.camera.positionCartographic;
171
+ return {
172
+ longitude: map_1.toDegrees(camPos.longitude),
173
+ latitude: map_1.toDegrees(camPos.latitude),
174
+ height: camPos.height,
175
+ };
176
+ };
177
+ // https://stackoverflow.com/questions/33348761/get-center-in-cesium-map
178
+ if (mapViewRef.scene.mode === cesium_1.SceneMode.SCENE3D) {
179
+ var windowPosition = new cesium_1.Cartesian2(
180
+ // eslint-disable-next-line @typescript-eslint/no-magic-numbers
181
+ mapViewRef.container.clientWidth / 2,
182
+ // eslint-disable-next-line @typescript-eslint/no-magic-numbers
183
+ mapViewRef.container.clientHeight / 2);
184
+ var pickRay = mapViewRef.scene.camera.getPickRay(windowPosition);
185
+ var pickPosition = mapViewRef.scene.globe.pick(pickRay, mapViewRef.scene);
186
+ var pickPositionCartographic = mapViewRef.scene.globe.ellipsoid.cartesianToCartographic(pickPosition);
187
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
188
+ return pickPositionCartographic !== undefined
189
+ ? {
190
+ longitude: map_1.toDegrees(pickPositionCartographic.longitude),
191
+ latitude: map_1.toDegrees(pickPositionCartographic.latitude),
192
+ height: mapViewRef.scene.camera.positionCartographic.height,
193
+ }
194
+ : getCameraPositionCartographic();
195
+ }
196
+ else {
197
+ return getCameraPositionCartographic();
198
+ }
199
+ };
200
+ var intervalHandle = setInterval(function () {
201
+ if (mapViewRef && mapViewRef.scene.mode !== cesium_1.SceneMode.MORPHING) {
202
+ var camera = mapViewRef.camera;
203
+ var store = {
204
+ position: getCameraPosition(),
205
+ direction: camera.direction.clone(),
206
+ up: camera.up.clone(),
207
+ right: camera.right.clone(),
208
+ transform: camera.transform.clone(),
209
+ frustum: camera.frustum.clone(),
210
+ };
211
+ setCameraState(store);
212
+ }
213
+ }, cameraPositionRefreshRate);
214
+ return function () {
215
+ clearInterval(intervalHandle);
216
+ };
217
+ }, [mapViewRef]);
218
+ react_1.useEffect(function () {
219
+ var morphCompleteHandler = function () {
220
+ if (mapViewRef && cameraState) {
221
+ void mapViewRef.camera.flyTo({
222
+ destination: cesium_1.Cartesian3.fromDegrees(cameraState.position.longitude, cameraState.position.latitude, cameraState.position.height),
223
+ duration: 0,
224
+ });
225
+ }
226
+ };
227
+ if (mapViewRef) {
228
+ mapViewRef.scene.morphComplete.addEventListener(morphCompleteHandler);
229
+ }
230
+ return function () {
231
+ if (mapViewRef) {
232
+ mapViewRef.scene.morphComplete.removeEventListener(morphCompleteHandler);
233
+ }
234
+ };
235
+ }, [mapViewRef, cameraState]);
236
+ react_1.useEffect(function () {
237
+ var zoom = props.zoom;
238
+ var center = props.center;
239
+ if (mapViewRef && lodash_1.isNumber(zoom) && lodash_1.isArray(center)) {
240
+ void mapViewRef.camera.flyTo({
241
+ destination: cesium_1.Cartesian3.fromDegrees(center[0], center[1], map_1.getAltitude(zoom)),
242
+ duration: 0,
243
+ });
244
+ }
245
+ }, [props.zoom, props.center, mapViewRef]);
246
+ return (react_1.default.createElement(resium_1.Viewer, __assign({ full: true, ref: ref }, viewerProps),
247
+ react_1.default.createElement(MapViewProvider, { value: mapViewRef },
248
+ props.children,
249
+ react_1.default.createElement(box_1.Box, { className: "sideToolsContainer" },
250
+ react_1.default.createElement(settings_1.CesiumSettings, { sceneModes: sceneModes, baseMaps: baseMaps, locale: locale })),
251
+ react_1.default.createElement(box_1.Box, { className: "toolsContainer" },
252
+ showMousePosition === true ? (react_1.default.createElement(coordinates_tracker_tool_1.CoordinatesTrackerTool, { projection: projection })) : (react_1.default.createElement(react_1.default.Fragment, null)),
253
+ showScale === true ? react_1.default.createElement(scale_tracker_tool_1.ScaleTrackerTool, { locale: locale }) : react_1.default.createElement(react_1.default.Fragment, null)),
254
+ props.imageryContextMenu &&
255
+ showImageryMenu &&
256
+ imageryMenuPosition &&
257
+ react_1.default.cloneElement(props.imageryContextMenu, {
258
+ data: (_a = mapViewRef === null || mapViewRef === void 0 ? void 0 : mapViewRef.layersManager) === null || _a === void 0 ? void 0 : _a.findLayerByPOI(imageryMenuPosition.x, imageryMenuPosition.y),
259
+ position: {
260
+ x: imageryMenuPosition.x,
261
+ y: imageryMenuPosition.y,
262
+ },
263
+ style: getImageryMenuStyle(imageryMenuPosition.x, imageryMenuPosition.y, (_c = (_b = props.imageryContextMenuSize) === null || _b === void 0 ? void 0 : _b.width) !== null && _c !== void 0 ? _c : DEFAULT_WIDTH, (_e = (_d = props.imageryContextMenuSize) === null || _d === void 0 ? void 0 : _d.height) !== null && _e !== void 0 ? _e : DEFAULT_HEIGHT, (_g = (_f = props.imageryContextMenuSize) === null || _f === void 0 ? void 0 : _f.dynamicHeightIncrement) !== null && _g !== void 0 ? _g : DEFAULT_DYNAMIC_HEIGHT_INCREMENT),
264
+ size: (_h = props.imageryContextMenuSize) !== null && _h !== void 0 ? _h : {
265
+ height: DEFAULT_HEIGHT,
266
+ width: DEFAULT_WIDTH,
267
+ },
268
+ handleClose: function () {
269
+ setShowImageryMenu(!showImageryMenu);
270
+ },
271
+ }))));
272
+ };
273
+ exports.CesiumMap = CesiumMap;
@@ -0,0 +1,8 @@
1
+ import { SceneMode } from 'cesium';
2
+ export declare type CesiumSceneModeEnum = SceneMode;
3
+ export declare const CesiumSceneMode: {
4
+ MORPHING: SceneMode;
5
+ COLUMBUS_VIEW: SceneMode;
6
+ SCENE2D: SceneMode;
7
+ SCENE3D: SceneMode;
8
+ };
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CesiumSceneMode = void 0;
4
+ var cesium_1 = require("cesium");
5
+ /* eslint-disable */
6
+ exports.CesiumSceneMode = {
7
+ MORPHING: cesium_1.SceneMode.MORPHING,
8
+ COLUMBUS_VIEW: cesium_1.SceneMode.COLUMBUS_VIEW,
9
+ SCENE2D: cesium_1.SceneMode.SCENE2D,
10
+ SCENE3D: cesium_1.SceneMode.SCENE3D,
11
+ };
12
+ /* eslint-enable */
@@ -0,0 +1,19 @@
1
+ import { PolylineDashMaterialProperty, ConstantProperty, VerticalOrigin, LabelStyle, Cartesian2, Cartesian3, BoundingSphere, Ellipsoid, ConstantPositionProperty, GeographicTilingScheme } from 'cesium';
2
+ export declare class CesiumPolylineDashMaterialProperty extends PolylineDashMaterialProperty {
3
+ }
4
+ export declare class CesiumConstantProperty extends ConstantProperty {
5
+ }
6
+ export declare class CesiumConstantPositionProperty extends ConstantPositionProperty {
7
+ }
8
+ export declare class CesiumCartesian2 extends Cartesian2 {
9
+ }
10
+ export declare class CesiumCartesian3 extends Cartesian3 {
11
+ }
12
+ export declare class CesiumBoundingSphere extends BoundingSphere {
13
+ }
14
+ export declare class CesiumEllipsoid extends Ellipsoid {
15
+ }
16
+ export declare class CesiumGeographicTilingScheme extends GeographicTilingScheme {
17
+ }
18
+ export declare const CesiumVerticalOrigin: typeof VerticalOrigin;
19
+ export declare const CesiumLabelStyle: typeof LabelStyle;
@@ -0,0 +1,89 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.CesiumLabelStyle = exports.CesiumVerticalOrigin = exports.CesiumGeographicTilingScheme = exports.CesiumEllipsoid = exports.CesiumBoundingSphere = exports.CesiumCartesian3 = exports.CesiumCartesian2 = exports.CesiumConstantPositionProperty = exports.CesiumConstantProperty = exports.CesiumPolylineDashMaterialProperty = void 0;
19
+ var cesium_1 = require("cesium");
20
+ // PROXIED CLASSES
21
+ var CesiumPolylineDashMaterialProperty = /** @class */ (function (_super) {
22
+ __extends(CesiumPolylineDashMaterialProperty, _super);
23
+ function CesiumPolylineDashMaterialProperty() {
24
+ return _super !== null && _super.apply(this, arguments) || this;
25
+ }
26
+ return CesiumPolylineDashMaterialProperty;
27
+ }(cesium_1.PolylineDashMaterialProperty));
28
+ exports.CesiumPolylineDashMaterialProperty = CesiumPolylineDashMaterialProperty;
29
+ var CesiumConstantProperty = /** @class */ (function (_super) {
30
+ __extends(CesiumConstantProperty, _super);
31
+ function CesiumConstantProperty() {
32
+ return _super !== null && _super.apply(this, arguments) || this;
33
+ }
34
+ return CesiumConstantProperty;
35
+ }(cesium_1.ConstantProperty));
36
+ exports.CesiumConstantProperty = CesiumConstantProperty;
37
+ var CesiumConstantPositionProperty = /** @class */ (function (_super) {
38
+ __extends(CesiumConstantPositionProperty, _super);
39
+ function CesiumConstantPositionProperty() {
40
+ return _super !== null && _super.apply(this, arguments) || this;
41
+ }
42
+ return CesiumConstantPositionProperty;
43
+ }(cesium_1.ConstantPositionProperty));
44
+ exports.CesiumConstantPositionProperty = CesiumConstantPositionProperty;
45
+ var CesiumCartesian2 = /** @class */ (function (_super) {
46
+ __extends(CesiumCartesian2, _super);
47
+ function CesiumCartesian2() {
48
+ return _super !== null && _super.apply(this, arguments) || this;
49
+ }
50
+ return CesiumCartesian2;
51
+ }(cesium_1.Cartesian2));
52
+ exports.CesiumCartesian2 = CesiumCartesian2;
53
+ var CesiumCartesian3 = /** @class */ (function (_super) {
54
+ __extends(CesiumCartesian3, _super);
55
+ function CesiumCartesian3() {
56
+ return _super !== null && _super.apply(this, arguments) || this;
57
+ }
58
+ return CesiumCartesian3;
59
+ }(cesium_1.Cartesian3));
60
+ exports.CesiumCartesian3 = CesiumCartesian3;
61
+ var CesiumBoundingSphere = /** @class */ (function (_super) {
62
+ __extends(CesiumBoundingSphere, _super);
63
+ function CesiumBoundingSphere() {
64
+ return _super !== null && _super.apply(this, arguments) || this;
65
+ }
66
+ return CesiumBoundingSphere;
67
+ }(cesium_1.BoundingSphere));
68
+ exports.CesiumBoundingSphere = CesiumBoundingSphere;
69
+ var CesiumEllipsoid = /** @class */ (function (_super) {
70
+ __extends(CesiumEllipsoid, _super);
71
+ function CesiumEllipsoid() {
72
+ return _super !== null && _super.apply(this, arguments) || this;
73
+ }
74
+ return CesiumEllipsoid;
75
+ }(cesium_1.Ellipsoid));
76
+ exports.CesiumEllipsoid = CesiumEllipsoid;
77
+ var CesiumGeographicTilingScheme = /** @class */ (function (_super) {
78
+ __extends(CesiumGeographicTilingScheme, _super);
79
+ function CesiumGeographicTilingScheme() {
80
+ return _super !== null && _super.apply(this, arguments) || this;
81
+ }
82
+ return CesiumGeographicTilingScheme;
83
+ }(cesium_1.GeographicTilingScheme));
84
+ exports.CesiumGeographicTilingScheme = CesiumGeographicTilingScheme;
85
+ // PROXIED ENUMS
86
+ // eslint-disable-next-line @typescript-eslint/naming-convention
87
+ exports.CesiumVerticalOrigin = cesium_1.VerticalOrigin;
88
+ // eslint-disable-next-line @typescript-eslint/naming-convention
89
+ exports.CesiumLabelStyle = cesium_1.LabelStyle;
@@ -0,0 +1,37 @@
1
+ .mapSelector {
2
+ width: 260px;
3
+ list-style: none;
4
+ padding-left: 0;
5
+ display: flex;
6
+ flex-wrap: wrap;
7
+ grid-gap: 4px;
8
+ min-height: 140px;
9
+ margin-block-start: 0px;
10
+ padding-inline-start: 0px;
11
+ }
12
+
13
+ .mapContainer {
14
+ }
15
+
16
+ .mapContainerSelected {
17
+ border: blueviolet 2px solid !important;
18
+ border-radius: 2px;
19
+ }
20
+
21
+ .mapContainer:hover {
22
+ border: tomato 2px solid;
23
+ border-radius: 2px;
24
+ }
25
+
26
+ .mapContainerImg {
27
+ width: 100%;
28
+ height: 100%;
29
+ }
30
+
31
+ .mapLabel {
32
+ font-size: 12px;
33
+ }
34
+
35
+ .mapLabel::before {
36
+ content: '\00a0';
37
+ }
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { IBaseMaps } from './settings';
3
+ import './base-maps.css';
4
+ export interface RCesiumBaseMapsProps {
5
+ baseMaps?: IBaseMaps;
6
+ }
7
+ export declare const CesiumBaseMaps: React.FC<RCesiumBaseMapsProps>;
@@ -0,0 +1,78 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
11
+ }) : function(o, v) {
12
+ o["default"] = v;
13
+ });
14
+ var __importStar = (this && this.__importStar) || function (mod) {
15
+ if (mod && mod.__esModule) return mod;
16
+ var result = {};
17
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
+ __setModuleDefault(result, mod);
19
+ return result;
20
+ };
21
+ Object.defineProperty(exports, "__esModule", { value: true });
22
+ exports.CesiumBaseMaps = void 0;
23
+ var react_1 = __importStar(require("react"));
24
+ var styles_1 = require("@material-ui/core/styles");
25
+ var map_1 = require("../map");
26
+ require("./base-maps.css");
27
+ var useStyle = styles_1.makeStyles(function (theme) {
28
+ return styles_1.createStyles({
29
+ mapContainer: {
30
+ width: '60px',
31
+ height: '60px',
32
+ border: theme.palette.background.paper + " 2px solid",
33
+ },
34
+ });
35
+ });
36
+ var CesiumBaseMaps = function (props) {
37
+ var mapViewer = map_1.useCesiumMap();
38
+ var baseMaps = props.baseMaps;
39
+ var _a = react_1.useState(' '), currentMap = _a[0], setCurrentMap = _a[1];
40
+ var _b = react_1.useState(), selectedBaseMap = _b[0], setSelectedBaseMap = _b[1];
41
+ var classes = useStyle();
42
+ react_1.useEffect(function () {
43
+ var defaultMap = baseMaps === null || baseMaps === void 0 ? void 0 : baseMaps.maps.find(function (map) { return map.isCurrent; });
44
+ if (defaultMap) {
45
+ setSelectedBaseMap(defaultMap);
46
+ setCurrentMap(defaultMap.title !== undefined ? defaultMap.title : ' ');
47
+ }
48
+ }, [baseMaps]);
49
+ var handleMapSection = function (id) {
50
+ var _a, _b;
51
+ if (baseMaps) {
52
+ // Remove previous base-map layers
53
+ (_a = mapViewer.layersManager) === null || _a === void 0 ? void 0 : _a.removeBaseMapLayers();
54
+ // Change base-map: add base-map layers by zIndex order
55
+ var selectedBaseMap_1 = baseMaps.maps.find(function (map) { return map.id === id; });
56
+ if (selectedBaseMap_1) {
57
+ (_b = mapViewer.layersManager) === null || _b === void 0 ? void 0 : _b.setBaseMapLayers(selectedBaseMap_1);
58
+ setSelectedBaseMap(selectedBaseMap_1);
59
+ baseMaps.maps.forEach(function (map) {
60
+ map.isCurrent = selectedBaseMap_1 === map;
61
+ });
62
+ }
63
+ }
64
+ };
65
+ return (react_1.default.createElement(react_1.default.Fragment, null,
66
+ react_1.default.createElement("label", { className: "mapLabel" }, currentMap),
67
+ react_1.default.createElement("ul", { className: "mapSelector" }, baseMaps === null || baseMaps === void 0 ? void 0 : baseMaps.maps.map(function (map) { return (react_1.default.createElement("li", { className: "mapContainer " + classes.mapContainer + " " + (map === selectedBaseMap ? 'mapContainerSelected' : ''), key: map.id },
68
+ react_1.default.createElement("img", { alt: '', className: "mapContainerImg", src: map.thumbnail, onMouseOver: function () {
69
+ setCurrentMap(map.title);
70
+ }, onMouseOut: function () {
71
+ setCurrentMap((selectedBaseMap === null || selectedBaseMap === void 0 ? void 0 : selectedBaseMap.title) !== undefined
72
+ ? selectedBaseMap.title
73
+ : ' ');
74
+ }, onClick: function () {
75
+ handleMapSection(map.id);
76
+ } }))); }))));
77
+ };
78
+ exports.CesiumBaseMaps = CesiumBaseMaps;
@@ -0,0 +1,19 @@
1
+ .mapViewIcon {
2
+ fill: #fff;
3
+ width: 40px;
4
+ height: 40px;
5
+ background: #303336;
6
+ border: 1px solid #444;
7
+ border-radius: 4px;
8
+ }
9
+
10
+ .mapViewIcon:hover {
11
+ background: #48b;
12
+ border-color: #aef;
13
+ }
14
+
15
+ .mapViewCurrent {
16
+ fill: #aef;
17
+ border: 1px solid #aef;
18
+ border-radius: 4px;
19
+ }
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { CesiumSceneModeEnum } from '../map.types';
3
+ import './scene-modes.css';
4
+ export interface RCesiumSceneModesProps {
5
+ sceneModes: CesiumSceneModeEnum[];
6
+ }
7
+ export declare const CesiumSceneModes: React.FC<RCesiumSceneModesProps>;
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
11
+ }) : function(o, v) {
12
+ o["default"] = v;
13
+ });
14
+ var __importStar = (this && this.__importStar) || function (mod) {
15
+ if (mod && mod.__esModule) return mod;
16
+ var result = {};
17
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
+ __setModuleDefault(result, mod);
19
+ return result;
20
+ };
21
+ Object.defineProperty(exports, "__esModule", { value: true });
22
+ exports.CesiumSceneModes = void 0;
23
+ var react_1 = __importStar(require("react"));
24
+ var react_core_1 = require("@map-colonies/react-core");
25
+ var map_types_1 = require("../map.types");
26
+ var map_1 = require("../map");
27
+ require("./scene-modes.css");
28
+ var NOT_FOUND = -1;
29
+ var CesiumSceneModes = function (props) {
30
+ var mapViewer = map_1.useCesiumMap();
31
+ var _a = react_1.useState(), currentSceneMode = _a[0], setCurrentSceneMode = _a[1];
32
+ var sceneModes = props.sceneModes;
33
+ var isInMapViews = function (sceneMode) {
34
+ return sceneModes.findIndex(function (item) { return item === sceneMode; }) > NOT_FOUND;
35
+ };
36
+ react_1.useEffect(function () {
37
+ setCurrentSceneMode(mapViewer.scene.mode);
38
+ }, []);
39
+ return (react_1.default.createElement(react_1.default.Fragment, null,
40
+ isInMapViews(map_types_1.CesiumSceneMode.SCENE3D) && (react_1.default.createElement(react_core_1.Icon, { icon: react_1.default.createElement("div", { className: "mapViewIcon " + (currentSceneMode === map_types_1.CesiumSceneMode.SCENE3D
41
+ ? 'mapViewCurrent'
42
+ : '') },
43
+ react_1.default.createElement("svg", { width: "100%", height: "100%", viewBox: "0 0 64 64" },
44
+ react_1.default.createElement("path", { d: "m 32.401392,4.9330437 c -7.087603,0 -14.096095,2.884602 -19.10793,7.8946843 -5.0118352,5.010083 -7.9296167,11.987468 -7.9296167,19.072999 0,7.085531 2.9177815,14.097848 7.9296167,19.107931 4.837653,4.835961 11.541408,7.631372 18.374354,7.82482 0.05712,0.01231 0.454119,0.139729 0.454119,0.139729 l 0.03493,-0.104797 c 0.08246,7.84e-4 0.162033,0.03493 0.244525,0.03493 0.08304,0 0.161515,-0.03414 0.244526,-0.03493 l 0.03493,0.104797 c 0,0 0.309474,-0.129487 0.349323,-0.139729 6.867765,-0.168094 13.582903,-2.965206 18.444218,-7.82482 2.558195,-2.5573 4.551081,-5.638134 5.903547,-8.977584 1.297191,-3.202966 2.02607,-6.661489 2.02607,-10.130347 0,-6.237309 -2.366261,-12.31219 -6.322734,-17.116794 -0.0034,-0.02316 0.0049,-0.04488 0,-0.06986 -0.01733,-0.08745 -0.104529,-0.278855 -0.104797,-0.279458 -5.31e-4,-0.0012 -0.522988,-0.628147 -0.523984,-0.62878 -3.47e-4,-2.2e-4 -0.133444,-0.03532 -0.244525,-0.06987 C 51.944299,13.447603 51.751076,13.104317 51.474391,12.827728 46.462556,7.8176457 39.488996,4.9330437 32.401392,4.9330437 z m -2.130866,3.5281554 0.104797,9.6762289 c -4.111695,-0.08361 -7.109829,-0.423664 -9.257041,-0.943171 1.198093,-2.269271 2.524531,-4.124404 3.91241,-5.414496 2.167498,-2.0147811 3.950145,-2.8540169 5.239834,-3.3185619 z m 2.794579,0 c 1.280302,0.4754953 3.022186,1.3285948 5.065173,3.2486979 1.424667,1.338973 2.788862,3.303645 3.982275,5.728886 -2.29082,0.403367 -5.381258,0.621049 -8.942651,0.698645 L 33.065105,8.4611991 z m 5.728886,0.2445256 c 4.004072,1.1230822 7.793098,3.1481363 10.724195,6.0782083 0.03468,0.03466 0.07033,0.06991 0.104797,0.104797 -0.45375,0.313891 -0.923054,0.663002 -1.956205,1.082899 -0.647388,0.263114 -1.906242,0.477396 -2.829511,0.733577 -1.382296,-2.988132 -3.027146,-5.368585 -4.785716,-7.0213781 -0.422866,-0.397432 -0.835818,-0.6453247 -1.25756,-0.9781032 z m -15.33525,0.7685092 c -0.106753,0.09503 -0.207753,0.145402 -0.31439,0.244526 -1.684973,1.5662541 -3.298068,3.8232211 -4.680919,6.5672591 -0.343797,-0.14942 -1.035052,-0.273198 -1.292493,-0.419186 -0.956528,-0.542427 -1.362964,-1.022024 -1.537018,-1.292493 -0.0241,-0.03745 -0.01868,-0.0401 -0.03493,-0.06986 2.250095,-2.163342 4.948824,-3.869984 7.859752,-5.0302421 z m -9.641296,7.0912431 c 0.464973,0.571618 0.937729,1.169056 1.956205,1.746612 0.349907,0.198425 1.107143,0.335404 1.537018,0.523983 -1.20166,3.172984 -1.998037,7.051901 -2.165798,11.772162 C 14.256557,30.361384 12.934823,30.161483 12.280427,29.90959 10.644437,29.279855 9.6888882,28.674891 9.1714586,28.267775 8.6540289,27.860658 8.6474751,27.778724 8.6474751,27.778724 l -0.069864,0.03493 C 9.3100294,23.691285 11.163248,19.798527 13.817445,16.565477 z m 37.552149,0.523984 c 2.548924,3.289983 4.265057,7.202594 4.890513,11.318043 -0.650428,0.410896 -1.756876,1.001936 -3.563088,1.606882 -1.171552,0.392383 -3.163859,0.759153 -4.960377,1.117832 -0.04367,-4.752703 -0.784809,-8.591423 -1.88634,-11.807094 0.917574,-0.263678 2.170552,-0.486495 2.864443,-0.76851 1.274693,-0.518066 2.003942,-1.001558 2.654849,-1.467153 z m -31.439008,2.619917 c 2.487341,0.672766 5.775813,1.137775 10.479669,1.222628 l 0.104797,10.689263 0,0.03493 0,0.733577 c -5.435005,-0.09059 -9.512219,-0.519044 -12.610536,-1.117831 0.106127,-4.776683 0.879334,-8.55791 2.02607,-11.562569 z m 23.264866,0.31439 c 1.073459,3.067541 1.833795,6.821314 1.816476,11.702298 -3.054474,0.423245 -7.062018,0.648559 -11.702298,0.698644 l 0,-0.838373 -0.104796,-10.654331 c 4.082416,-0.0864 7.404468,-0.403886 9.990618,-0.908238 z M 8.2632205,30.922625 c 0.7558676,0.510548 1.5529563,1.013339 3.0041715,1.57195 0.937518,0.360875 2.612202,0.647642 3.91241,0.978102 0.112814,3.85566 0.703989,7.107756 1.606883,9.920754 -1.147172,-0.324262 -2.644553,-0.640648 -3.423359,-0.978102 -1.516688,-0.657177 -2.386627,-1.287332 -2.864443,-1.71168 -0.477816,-0.424347 -0.489051,-0.489051 -0.489051,-0.489051 L 9.8002387,40.319395 C 8.791691,37.621767 8.1584238,34.769583 8.1584238,31.900727 c 0,-0.330153 0.090589,-0.648169 0.1047967,-0.978102 z m 48.2763445,0.419186 c 0.0047,0.188973 0.06986,0.36991 0.06986,0.558916 0,2.938869 -0.620228,5.873558 -1.676747,8.628261 -0.07435,0.07583 -0.06552,0.07411 -0.454119,0.349323 -0.606965,0.429857 -1.631665,1.042044 -3.318562,1.676747 -1.208528,0.454713 -3.204964,0.850894 -5.135038,1.25756 0.84593,-2.765726 1.41808,-6.005357 1.606883,-9.815957 2.232369,-0.413371 4.483758,-0.840201 5.938479,-1.327425 1.410632,-0.472457 2.153108,-0.89469 2.96924,-1.327425 z m -38.530252,2.864443 c 3.208141,0.56697 7.372279,0.898588 12.575603,0.978103 l 0.174662,9.885821 c -4.392517,-0.06139 -8.106722,-0.320566 -10.863925,-0.803441 -1.051954,-2.664695 -1.692909,-6.043794 -1.88634,-10.060483 z m 26.793022,0.31439 c -0.246298,3.923551 -0.877762,7.263679 -1.816476,9.885822 -2.561957,0.361954 -5.766249,0.560708 -9.431703,0.62878 l -0.174661,-9.815957 c 4.491734,-0.04969 8.334769,-0.293032 11.42284,-0.698645 z M 12.035901,44.860585 c 0.09977,0.04523 0.105535,0.09465 0.209594,0.139729 1.337656,0.579602 3.441099,1.058072 5.589157,1.537018 1.545042,3.399208 3.548524,5.969402 5.589157,7.789888 -3.034411,-1.215537 -5.871615,-3.007978 -8.174142,-5.309699 -1.245911,-1.245475 -2.271794,-2.662961 -3.213766,-4.156936 z m 40.69605,0 c -0.941972,1.493975 -1.967855,2.911461 -3.213765,4.156936 -2.74253,2.741571 -6.244106,4.696717 -9.955686,5.868615 0.261347,-0.241079 0.507495,-0.394491 0.768509,-0.663713 1.674841,-1.727516 3.320792,-4.181056 4.645987,-7.265904 2.962447,-0.503021 5.408965,-1.122293 7.161107,-1.781544 0.284034,-0.106865 0.337297,-0.207323 0.593848,-0.31439 z m -31.404076,2.305527 c 2.645807,0.376448 5.701178,0.649995 9.466635,0.698645 l 0.139729,7.789888 c -1.38739,-0.480844 -3.316218,-1.29837 -5.659022,-3.388427 -1.388822,-1.238993 -2.743668,-3.0113 -3.947342,-5.100106 z m 20.365491,0.104797 c -1.04872,2.041937 -2.174337,3.779068 -3.353494,4.995309 -1.853177,1.911459 -3.425515,2.82679 -4.611055,3.353494 l -0.139729,-7.789887 c 3.13091,-0.05714 5.728238,-0.278725 8.104278,-0.558916 z" }))), onClick: function () {
45
+ mapViewer.scene.morphTo3D();
46
+ setCurrentSceneMode(map_types_1.CesiumSceneMode.SCENE3D);
47
+ } })),
48
+ isInMapViews(map_types_1.CesiumSceneMode.SCENE2D) && (react_1.default.createElement(react_core_1.Icon, { icon: react_1.default.createElement("div", { className: "mapViewIcon " + (currentSceneMode === map_types_1.CesiumSceneMode.SCENE2D
49
+ ? 'mapViewCurrent'
50
+ : '') },
51
+ react_1.default.createElement("svg", { width: "100%", height: "100%", viewBox: "0 0 64 64" },
52
+ react_1.default.createElement("path", { d: "m 2.9825053,17.550598 0,1.368113 0,26.267766 0,1.368113 1.36811,0 54.9981397,0 1.36811,0 0,-1.368113 0,-26.267766 0,-1.368113 -1.36811,0 -54.9981397,0 -1.36811,0 z m 2.73623,2.736226 10.3292497,0 0,10.466063 -10.3292497,0 0,-10.466063 z m 13.0654697,0 11.69737,0 0,10.466063 -11.69737,0 0,-10.466063 z m 14.43359,0 11.69737,0 0,10.466063 -11.69737,0 0,-10.466063 z m 14.43359,0 10.32926,0 0,10.466063 -10.32926,0 0,-10.466063 z m -41.9326497,13.202288 10.3292497,0 0,10.329252 -10.3292497,0 0,-10.329252 z m 13.0654697,0 11.69737,0 0,10.329252 -11.69737,0 0,-10.329252 z m 14.43359,0 11.69737,0 0,10.329252 -11.69737,0 0,-10.329252 z m 14.43359,0 10.32926,0 0,10.329252 -10.32926,0 0,-10.329252 z" }))), onClick: function () {
53
+ mapViewer.scene.morphTo2D();
54
+ setCurrentSceneMode(map_types_1.CesiumSceneMode.SCENE2D);
55
+ } })),
56
+ isInMapViews(map_types_1.CesiumSceneMode.COLUMBUS_VIEW) && (react_1.default.createElement(react_core_1.Icon, { icon: react_1.default.createElement("div", { className: "mapViewIcon " + (currentSceneMode === map_types_1.CesiumSceneMode.COLUMBUS_VIEW
57
+ ? 'mapViewCurrent'
58
+ : '') },
59
+ react_1.default.createElement("svg", { width: "100%", height: "100%", viewBox: "0 0 64 64" },
60
+ react_1.default.createElement("path", { d: "m 14.723969,17.675598 -0.340489,0.817175 -11.1680536,26.183638 -0.817175,1.872692 2.076986,0 54.7506996,0 2.07698,0 -0.81717,-1.872692 -11.16805,-26.183638 -0.34049,-0.817175 -0.91933,0 -32.414586,0 -0.919322,0 z m 1.838643,2.723916 6.196908,0 -2.928209,10.418977 -7.729111,0 4.460412,-10.418977 z m 9.02297,0 4.903049,0 0,10.418977 -7.831258,0 2.928209,-10.418977 z m 7.626964,0 5.584031,0 2.62176,10.418977 -8.205791,0 0,-10.418977 z m 8.410081,0 5.51593,0 4.46042,10.418977 -7.38863,0 -2.58772,-10.418977 z m -30.678091,13.142892 8.103649,0 -2.89416,10.282782 -9.6018026,0 4.3923136,-10.282782 z m 10.929711,0 8.614384,0 0,10.282782 -11.508544,0 2.89416,-10.282782 z m 11.338299,0 8.852721,0 2.58772,10.282782 -11.440441,0 0,-10.282782 z m 11.678781,0 7.86531,0 4.39231,10.282782 -9.6699,0 -2.58772,-10.282782 z" }))), onClick: function () {
61
+ mapViewer.scene.morphToColumbusView();
62
+ setCurrentSceneMode(map_types_1.CesiumSceneMode.COLUMBUS_VIEW);
63
+ } }))));
64
+ };
65
+ exports.CesiumSceneModes = CesiumSceneModes;