@map-colonies/react-components 3.10.4 → 3.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +71 -0
- package/dist/cesium-map/layers/3d.tileset.js +11 -7
- package/dist/cesium-map/layers/3d.tileset.with.update.d.ts +6 -0
- package/dist/cesium-map/layers/3d.tileset.with.update.js +115 -0
- package/dist/cesium-map/layers/imagery.layer.js +9 -5
- package/dist/cesium-map/layers-manager.d.ts +10 -2
- package/dist/cesium-map/layers-manager.js +19 -1
- package/dist/cesium-map/map-legend/MapLegend.css +135 -0
- package/dist/cesium-map/map-legend/MapLegend.d.ts +15 -0
- package/dist/cesium-map/map-legend/MapLegend.js +57 -0
- package/dist/cesium-map/map-legend/MapLegendList.d.ts +13 -0
- package/dist/cesium-map/map-legend/MapLegendList.js +43 -0
- package/dist/cesium-map/map-legend/MapLegendSidebar.d.ts +16 -0
- package/dist/cesium-map/map-legend/MapLegendSidebar.js +20 -0
- package/dist/cesium-map/map-legend/MapLegendToggle.d.ts +7 -0
- package/dist/cesium-map/map-legend/MapLegendToggle.js +20 -0
- package/dist/cesium-map/map-legend/index.d.ts +3 -0
- package/dist/cesium-map/map-legend/index.js +14 -0
- package/dist/cesium-map/map.css +6 -1
- package/dist/cesium-map/map.d.ts +16 -1
- package/dist/cesium-map/map.js +51 -21
- package/dist/cesium-map/settings/settings.css +5 -2
- package/dist/cesium-map/tools/terranian-height.tool.js +1 -0
- package/dist/file-picker/file-picker.css +2 -1
- package/package.json +3 -3
- package/src/lib/cesium-map/layers/3d.tileset.stories.tsx +60 -6
- package/src/lib/cesium-map/layers/3d.tileset.tsx +13 -9
- package/src/lib/cesium-map/layers/3d.tileset.with.update.tsx +120 -0
- package/src/lib/cesium-map/layers/imagery.layer.tsx +12 -7
- package/src/lib/cesium-map/layers-manager.ts +35 -2
- package/src/lib/cesium-map/map-legend/MapLegend.css +135 -0
- package/src/lib/cesium-map/map-legend/MapLegend.tsx +91 -0
- package/src/lib/cesium-map/map-legend/MapLegendList.tsx +46 -0
- package/src/lib/cesium-map/map-legend/MapLegendSidebar.tsx +55 -0
- package/src/lib/cesium-map/map-legend/MapLegendToggle.tsx +31 -0
- package/src/lib/cesium-map/map-legend/index.tsx +3 -0
- package/src/lib/cesium-map/map-legend/legends-sidebar.stories.tsx +201 -0
- package/src/lib/cesium-map/map.css +6 -1
- package/src/lib/cesium-map/map.tsx +86 -20
- package/src/lib/cesium-map/settings/settings.css +5 -2
- package/src/lib/cesium-map/terrain-providers/terrain-provider-heights-tool.stories.tsx +41 -26
- package/src/lib/cesium-map/terrain-providers/terrain-provider.stories.tsx +3 -1
- package/src/lib/cesium-map/tools/terranian-height.tool.tsx +4 -0
- package/src/lib/file-picker/file-picker.css +2 -1
- package/dist/cesium-map/layers/3d.tileset.update.d.ts +0 -1
- package/dist/cesium-map/layers/3d.tileset.update.js +0 -5
- package/src/lib/cesium-map/layers/3d.tileset.update.ts +0 -72
- package/storybook-static/mock/tileset_1/ll.b3dm +0 -0
- package/storybook-static/mock/tileset_1/lr.b3dm +0 -0
- package/storybook-static/mock/tileset_1/parent.b3dm +0 -0
- package/storybook-static/mock/tileset_1/tileset.json +0 -124
- package/storybook-static/mock/tileset_1/ul.b3dm +0 -0
- package/storybook-static/mock/tileset_1/ur.b3dm +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,77 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [3.12.0](https://github.com/MapColonies/shared-components/compare/@map-colonies/react-components@3.11.0...@map-colonies/react-components@3.12.0) (2022-08-04)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* legend sidebar ([cdca0cc](https://github.com/MapColonies/shared-components/commit/cdca0ccd1f8ee21a575557cc6c13903beaed8ca2))
|
|
12
|
+
* legends style tweaks ([eec1f08](https://github.com/MapColonies/shared-components/commit/eec1f083fa22c818cb55ab3e4d947b61e428f215))
|
|
13
|
+
* lint and prettier ([68bf8f6](https://github.com/MapColonies/shared-components/commit/68bf8f64321043ee1d00d46c08f834698bf18276))
|
|
14
|
+
* map legends final tweaks ([9b00733](https://github.com/MapColonies/shared-components/commit/9b00733594716a0d19eff17249cd2280ca8704a3))
|
|
15
|
+
* map legends fine tuning ([de59b02](https://github.com/MapColonies/shared-components/commit/de59b02a657000e24f962dfc0c405a73f8d4ba11))
|
|
16
|
+
* map legends props to single prop ([5fafca0](https://github.com/MapColonies/shared-components/commit/5fafca0705d1bbee29e80121c09c19fd9c2a959f))
|
|
17
|
+
* map legends styles ([1355962](https://github.com/MapColonies/shared-components/commit/135596209224f52c11d28a2b85f2b470c1980936))
|
|
18
|
+
* pr rejects and prettier ([2fbeb20](https://github.com/MapColonies/shared-components/commit/2fbeb206e2f86589128d21e2ac14e5a57090d7f2))
|
|
19
|
+
* prettier ([f12096a](https://github.com/MapColonies/shared-components/commit/f12096a9839beddad1553ade17c338a07414d882))
|
|
20
|
+
* X btn wrong place ([9ff0ca0](https://github.com/MapColonies/shared-components/commit/9ff0ca0ef928db12d47b1bd428967feadb411d10))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### Features
|
|
24
|
+
|
|
25
|
+
* add sidebar for the cesium viewer ([81dfe0b](https://github.com/MapColonies/shared-components/commit/81dfe0bdd38d7dcaa131e7b5e24000767b794d81))
|
|
26
|
+
* implement legends sidebar and create story ([60e9b58](https://github.com/MapColonies/shared-components/commit/60e9b587aadb866a9ce14d6508c39239fdfd03fb))
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
# [3.11.0](https://github.com/MapColonies/shared-components/compare/@map-colonies/react-components@3.10.5...@map-colonies/react-components@3.11.0) (2022-05-02)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
### Bug Fixes
|
|
36
|
+
|
|
37
|
+
* 3d story ([ee59db0](https://github.com/MapColonies/shared-components/commit/ee59db00f627b709368f830a3c7cf30dc2cf0525))
|
|
38
|
+
* 3d with update ([86fd98b](https://github.com/MapColonies/shared-components/commit/86fd98b59d137f3bfddc351a98cefcef7b6fc19a))
|
|
39
|
+
* 3d with update ([c554c57](https://github.com/MapColonies/shared-components/commit/c554c57ba85c68e3a5e53c128714d86733db10d0))
|
|
40
|
+
* bounding volume minimum height ([87e0e81](https://github.com/MapColonies/shared-components/commit/87e0e8114f088a4997723f91760f80250e67f629))
|
|
41
|
+
* build errors ([57bc0fa](https://github.com/MapColonies/shared-components/commit/57bc0fac22aebf865112d3c26d1bf46ee57d4dad))
|
|
42
|
+
* fix ([6999626](https://github.com/MapColonies/shared-components/commit/69996260b96379813b051104204568b190d46eaa))
|
|
43
|
+
* fix ([d958564](https://github.com/MapColonies/shared-components/commit/d958564cf178e7258fcdf2c21a1915b0e442c52c))
|
|
44
|
+
* fix ([db76412](https://github.com/MapColonies/shared-components/commit/db7641201cde062e360131a73081867b4db854ba))
|
|
45
|
+
* fix ([16c4499](https://github.com/MapColonies/shared-components/commit/16c4499a33c1c5d0bd34cd33958d5381e05ac3b6))
|
|
46
|
+
* linting ([ca5f578](https://github.com/MapColonies/shared-components/commit/ca5f578f0e2f3422213e4f7e4cfa1abdd05576b8))
|
|
47
|
+
* prettier ([f516da2](https://github.com/MapColonies/shared-components/commit/f516da2ce8f1b59d18ace5cafe6e12642046e19a))
|
|
48
|
+
* prettier ([226ca71](https://github.com/MapColonies/shared-components/commit/226ca71c110abf50c89a36125c33f3e66cf195dc))
|
|
49
|
+
* prettier ([6b1c751](https://github.com/MapColonies/shared-components/commit/6b1c7511355e35b199a5b127668df93e9c393c3b))
|
|
50
|
+
* prettier ([c4e6c13](https://github.com/MapColonies/shared-components/commit/c4e6c13ebc77774b8764f582f710777e316b586b))
|
|
51
|
+
* prettier ([a6613d7](https://github.com/MapColonies/shared-components/commit/a6613d7292aa8eb0b00f83d0885e61dfa4860ca0))
|
|
52
|
+
* revert ([44c6a9b](https://github.com/MapColonies/shared-components/commit/44c6a9b6a34f2f8a6281f26c90ddfe3583832100))
|
|
53
|
+
* story ([c348df4](https://github.com/MapColonies/shared-components/commit/c348df4cdf771483e5e5ade78bac3e734dd4965d))
|
|
54
|
+
* unused ([bf696fe](https://github.com/MapColonies/shared-components/commit/bf696fe20b7e20223ef9f05962d9eecbb2760d06))
|
|
55
|
+
* zoom to ([e78def4](https://github.com/MapColonies/shared-components/commit/e78def47940ab569691677ee71f6ac41a4c3f1bd))
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
### Features
|
|
59
|
+
|
|
60
|
+
* update tileset ([17ed73c](https://github.com/MapColonies/shared-components/commit/17ed73c43ba41ad54e70e6c17d152eeb38887009))
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
## [3.10.5](https://github.com/MapColonies/shared-components/compare/@map-colonies/react-components@3.10.4...@map-colonies/react-components@3.10.5) (2022-03-29)
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
### Bug Fixes
|
|
70
|
+
|
|
71
|
+
* folderchain alignment ([#125](https://github.com/MapColonies/shared-components/issues/125)) ([01c3670](https://github.com/MapColonies/shared-components/commit/01c3670567b67b81ad98a10705eb1a8a0bc74206))
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
6
77
|
## [3.10.4](https://github.com/MapColonies/shared-components/compare/@map-colonies/react-components@3.10.3...@map-colonies/react-components@3.10.4) (2022-03-02)
|
|
7
78
|
|
|
8
79
|
|
|
@@ -15,22 +15,26 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.Cesium3DTileset = void 0;
|
|
18
|
-
var cesium_1 = require("cesium");
|
|
19
18
|
var react_1 = __importDefault(require("react"));
|
|
19
|
+
var cesium_1 = require("cesium");
|
|
20
20
|
var resium_1 = require("resium");
|
|
21
21
|
var map_1 = require("../map");
|
|
22
|
+
var GROUND_LEVEL = 0.0;
|
|
22
23
|
var Cesium3DTileset = function (props) {
|
|
23
24
|
var mapViewer = map_1.useCesiumMap();
|
|
24
25
|
return (react_1.default.createElement(resium_1.Cesium3DTileset, __assign({}, props, { onReady: function (tileset) {
|
|
25
|
-
var _a;
|
|
26
|
+
var _a, _b;
|
|
26
27
|
(_a = props.onReady) === null || _a === void 0 ? void 0 : _a.call(props, tileset);
|
|
27
|
-
if (props.isZoomTo) {
|
|
28
|
+
if (props.isZoomTo === true) {
|
|
28
29
|
void mapViewer.zoomTo(tileset);
|
|
29
30
|
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
var scene = mapViewer.scene;
|
|
32
|
+
scene.globe.depthTestAgainstTerrain = true;
|
|
33
|
+
var cartographic = cesium_1.Cartographic.fromCartesian(tileset.boundingSphere.center);
|
|
34
|
+
var heightFromGround = (_b = props.heightFromGround) !== null && _b !== void 0 ? _b : GROUND_LEVEL;
|
|
35
|
+
if (heightFromGround) {
|
|
36
|
+
var surface = cesium_1.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, cartographic.height);
|
|
37
|
+
var offset = cesium_1.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, cartographic.height + heightFromGround);
|
|
34
38
|
var translation = cesium_1.Cartesian3.subtract(offset, surface, new cesium_1.Cartesian3());
|
|
35
39
|
tileset.modelMatrix = cesium_1.Matrix4.fromTranslation(translation);
|
|
36
40
|
}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* eslint-disable @typescript-eslint/ban-ts-comment */
|
|
3
|
+
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
|
4
|
+
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
|
5
|
+
/* eslint-disable @typescript-eslint/no-unnecessary-condition */
|
|
6
|
+
/*
|
|
7
|
+
https://sandcastle.cesium.com/index.html?#c=fVZtTxs5EP4re3xho0YOkOv1jgC6ElIuiAQKKaWQqnJ2nayL187Z3qCk4r/f+GXf8nKWot3YzzOeGT8z6wWWQRdLTRTFvB2cBl14y1JUznXGfMxbreBSYq798tV9gKOIKBVoESxFJgMqeICVIlqNuTfRFxzFZIozpj9a8Ei8EA5b7JPlVTK5jOgNvep/WfUPh7Sv+vzufdTt/9F/mT8+dK/+QgD6N758MSA6GJ3/HB712gN60H66fHq5Ht0l39K+vvnaWw27h/RmFP+8ueitBqvB+8FqRq+7V/MnMDa8+Kz6KUtieB+MPv8+/Am/i8HBoH2AztvdD0NBlu2n28do+uHHp8fz3rdXKiN91J6qLyS64/eHR5+YHv65b3OwgFRFNrQRkRJTfivFgsZEllmLJMGafBWSxR4TNjqOSRijcyVovEnm5DU30NuBsmacoQUlr+u0BzsX7jv3uoJr4BK53wx+jXkAY4IVucZLIm9p9ALs42CKmSJNt6rXXDreHueYv+XRqIhwAj44Z5D9az20b2jGxITA4c91MiJKf5yBFaW9OaBpmZEiIE0ZAeHAtCPPJU2ppguiEI7j0LlYCdY92hcjxwt9iGZkkh0HpfzuiAJtRgRNpUg/GnX247D9oX3UcJQ3ePrEujhWQqQjEXqPPAoJnRD5ShUJpxmPtJF6CKEI2Qgqe0eCK8EIYmLmVzv5LnaLgpvNYxCJ8T6wOxVWTDImIuMx5bMHwbLUZNggUH3W26XTIPSxQpnBecfWHAJHNOH6vMZp1HzdvstWYh5E6aKHrbE6JSAVMWGw7FfQDztRASSEzhJjoO4HSimnaZb+Y5creJCFtpK3htAPqaOunapguJApZoWInAKLokMzAlRNo/tMTnFEhhYdOsNNp66i44WNRsWwmE6dOksASqGn0Tlbni/vI8ywDN3uTR/Z/xuMYF7UO62YSTxPaGSFWvC8e1XuHNZBiCX7NSG2y/oWkevCJWG9rk9PT3f2oZo+zFaSKIjSHKNxsFMuugVUHOJBZc37hwAj2IKEDltUAuwOzv/awJfxKJzOGfG+DYTSFwR6GQNtbw2pGTxb9743EBQpLwrUb6xqUW1E5kHPB987dZRJ4W9rteVD2bDoUqIzyTcyVSmcNaQzVoG+NcpCcy95KrfFVXOiCGeboLQo5VQ/jEJSQlHbl2oKV9lESxxpT2r6MtitbDPWy7NuMmKCkzDfrrmBrvXLtx0t0zR8KUSZAXNUZiLvQ3cEx8tafkqyY+4Uo8kGowqsWNf9VwCZ57XAsfka9RawxbXHlKdSa+NVEZkFW3Y1n6uj4p210tmE5D6Fjd3a2tSPbTUJZbG0ly6XI/+/0lEY4TOdmDL3a8jNeMhUyCA0OGorHR4nntIJ3r2jOxJtTim390y/V3yz7t1jHkdYafh6QE5HYjZj5DzTGjK5n18SehxPoOzhCmMuC82gyHWUELjCxDUBrM+ZsaMFbr/a7NTELiu72uj6KdRzkksq16E9tb3m3onSS0bOHOVvms6F1OYyEyLU0gQ6IthQrUkGQcIhKmVoJ62cdBLTRUDj0/He2v1vvBdEDG7lsDLNGLunKzLeOztpAb5GY6Bu+ArfLIhkeGkgyeHZtZtECJ204O8mSwvBJlhWLP4H
|
|
8
|
+
*/
|
|
9
|
+
var __assign = (this && this.__assign) || function () {
|
|
10
|
+
__assign = Object.assign || function(t) {
|
|
11
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
12
|
+
s = arguments[i];
|
|
13
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
14
|
+
t[p] = s[p];
|
|
15
|
+
}
|
|
16
|
+
return t;
|
|
17
|
+
};
|
|
18
|
+
return __assign.apply(this, arguments);
|
|
19
|
+
};
|
|
20
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
21
|
+
if (k2 === undefined) k2 = k;
|
|
22
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
23
|
+
}) : (function(o, m, k, k2) {
|
|
24
|
+
if (k2 === undefined) k2 = k;
|
|
25
|
+
o[k2] = m[k];
|
|
26
|
+
}));
|
|
27
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
28
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
29
|
+
}) : function(o, v) {
|
|
30
|
+
o["default"] = v;
|
|
31
|
+
});
|
|
32
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
33
|
+
if (mod && mod.__esModule) return mod;
|
|
34
|
+
var result = {};
|
|
35
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
36
|
+
__setModuleDefault(result, mod);
|
|
37
|
+
return result;
|
|
38
|
+
};
|
|
39
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
+
exports.Cesium3DTilesetWithUpdate = void 0;
|
|
41
|
+
var react_1 = __importStar(require("react"));
|
|
42
|
+
var cesium_1 = require("cesium");
|
|
43
|
+
var map_1 = require("../map");
|
|
44
|
+
var Cesium3DTilesetWithUpdate = function (_a) {
|
|
45
|
+
var url = _a.url, withUpdate = _a.withUpdate;
|
|
46
|
+
var mapViewer = map_1.useCesiumMap();
|
|
47
|
+
var scene = mapViewer.scene;
|
|
48
|
+
var cesium3DTileset = react_1.useState(new cesium_1.Cesium3DTileset({
|
|
49
|
+
url: url,
|
|
50
|
+
}))[0];
|
|
51
|
+
var tileset = react_1.useState(scene.primitives.add(cesium3DTileset))[0];
|
|
52
|
+
react_1.useEffect(function () {
|
|
53
|
+
scene.globe.depthTestAgainstTerrain = true;
|
|
54
|
+
void mapViewer.zoomTo(tileset);
|
|
55
|
+
if (withUpdate === true) {
|
|
56
|
+
updateTileset(tileset);
|
|
57
|
+
}
|
|
58
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
59
|
+
}, []);
|
|
60
|
+
var updateContent = function (model, boundingVolume) {
|
|
61
|
+
var _a;
|
|
62
|
+
var height = boundingVolume.minimumHeight
|
|
63
|
+
? boundingVolume.minimumHeight
|
|
64
|
+
: boundingVolume.center.z - boundingVolume.radius;
|
|
65
|
+
// @ts-ignore
|
|
66
|
+
var center = (_a = model._rtcCenter) !== null && _a !== void 0 ? _a : boundingVolume.center;
|
|
67
|
+
var normal = scene.globe.ellipsoid.geodeticSurfaceNormal(center, new cesium_1.Cartesian3());
|
|
68
|
+
var offset = cesium_1.Cartesian3.multiplyByScalar(normal, height, new cesium_1.Cartesian3());
|
|
69
|
+
var carto = cesium_1.Cartographic.fromCartesian(center);
|
|
70
|
+
void new Promise(function (resolve, reject) {
|
|
71
|
+
// @ts-ignore
|
|
72
|
+
if (scene.terrainProvider._ready !== true) {
|
|
73
|
+
var result = __assign({}, carto);
|
|
74
|
+
result.height = 0;
|
|
75
|
+
resolve(result);
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
void cesium_1.sampleTerrainMostDetailed(scene.terrainProvider, [carto]).then(function (results) {
|
|
79
|
+
var result = results[0];
|
|
80
|
+
if (!cesium_1.defined(result)) {
|
|
81
|
+
resolve(carto);
|
|
82
|
+
}
|
|
83
|
+
resolve(result);
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
}).then(function (result) {
|
|
87
|
+
var resultCartesian = cesium_1.Cartographic.toCartesian(result);
|
|
88
|
+
var position = cesium_1.Cartesian3.subtract(resultCartesian, offset, new cesium_1.Cartesian3());
|
|
89
|
+
// @ts-ignore
|
|
90
|
+
model._rtcCenter = cesium_1.Cartesian3.clone(position, model._rtcCenter);
|
|
91
|
+
});
|
|
92
|
+
};
|
|
93
|
+
var updateTile = function (tile) {
|
|
94
|
+
if (tile.content !== undefined) {
|
|
95
|
+
// @ts-ignore
|
|
96
|
+
updateContent(tile.content, tile.boundingVolume.boundingVolume);
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
var listener_1 = tileset.tileLoad.addEventListener(function (t) {
|
|
100
|
+
if (t === tile) {
|
|
101
|
+
updateContent(t.content, t.boundingVolume.boundingVolume);
|
|
102
|
+
listener_1();
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
tile.children.forEach(function (child) { return updateTile(child); });
|
|
107
|
+
};
|
|
108
|
+
var updateTileset = function (tileset) {
|
|
109
|
+
void tileset.readyPromise.then(function () {
|
|
110
|
+
updateTile(tileset.root);
|
|
111
|
+
});
|
|
112
|
+
};
|
|
113
|
+
return react_1.default.createElement(react_1.default.Fragment, null);
|
|
114
|
+
};
|
|
115
|
+
exports.Cesium3DTilesetWithUpdate = Cesium3DTilesetWithUpdate;
|
|
@@ -50,14 +50,18 @@ var CesiumImageryLayer = function (props) {
|
|
|
50
50
|
var meta = props.meta, restProps = __rest(props, ["meta"]);
|
|
51
51
|
var mapViewer = map_1.useCesiumMap();
|
|
52
52
|
react_1.useLayoutEffect(function () {
|
|
53
|
-
var _a;
|
|
54
|
-
(_a = mapViewer.layersManager) === null || _a === void 0 ? void 0 : _a.addMetaToLayer(meta,
|
|
53
|
+
var _a, _b;
|
|
54
|
+
(_a = mapViewer.layersManager) === null || _a === void 0 ? void 0 : _a.addMetaToLayer(meta,
|
|
55
|
+
/* eslint-disable */
|
|
56
|
+
(_b = meta.searchLayerPredicate) !== null && _b !== void 0 ? _b : (function (layer, idx) {
|
|
55
57
|
if (meta !== undefined) {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
+
return (layer._imageryProvider._resource._url ===
|
|
59
|
+
meta.options.url);
|
|
58
60
|
}
|
|
59
61
|
return false;
|
|
60
|
-
})
|
|
62
|
+
})
|
|
63
|
+
/* eslint-enable */
|
|
64
|
+
);
|
|
61
65
|
}, [meta, mapViewer]);
|
|
62
66
|
return react_1.default.createElement(resium_1.ImageryLayer, __assign({}, restProps));
|
|
63
67
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { ImageryLayer } from 'cesium';
|
|
1
|
+
import { ImageryLayer, Event } from 'cesium';
|
|
2
2
|
import { RCesiumOSMLayerOptions, RCesiumWMSLayerOptions, RCesiumWMTSLayerOptions, RCesiumXYZLayerOptions } from './layers';
|
|
3
3
|
import { CesiumViewer } from './map';
|
|
4
4
|
import { IBaseMap } from './settings/settings';
|
|
5
|
+
import { IMapLegend } from './map-legend';
|
|
5
6
|
export interface ICesiumImageryLayer extends InstanceType<typeof ImageryLayer> {
|
|
6
7
|
meta?: Record<string, unknown>;
|
|
7
8
|
}
|
|
@@ -21,10 +22,16 @@ export interface IVectorLayer {
|
|
|
21
22
|
zIndex: number;
|
|
22
23
|
url: string;
|
|
23
24
|
}
|
|
25
|
+
export declare type LegendExtractor = (layers: (any & {
|
|
26
|
+
meta: any;
|
|
27
|
+
})[]) => IMapLegend[];
|
|
24
28
|
declare class LayerManager {
|
|
25
29
|
mapViewer: CesiumViewer;
|
|
26
30
|
private readonly layers;
|
|
27
|
-
|
|
31
|
+
legendsList: IMapLegend[];
|
|
32
|
+
layerUpdated: Event;
|
|
33
|
+
private readonly legendsExtractor?;
|
|
34
|
+
constructor(mapViewer: CesiumViewer, legendsExtractor?: LegendExtractor, onLayersUpdate?: () => void);
|
|
28
35
|
addMetaToLayer(meta: any, layerPredicate: (layer: ImageryLayer, idx: number) => boolean): void;
|
|
29
36
|
setBaseMapLayers(baseMap: IBaseMap): void;
|
|
30
37
|
addRasterLayer(layer: IRasterLayer, index: number, parentId: string): void;
|
|
@@ -40,6 +47,7 @@ declare class LayerManager {
|
|
|
40
47
|
showAllNotBase(isShow: boolean): void;
|
|
41
48
|
get(layerId: string): ICesiumImageryLayer | undefined;
|
|
42
49
|
findLayerByPOI(x: number, y: number): ICesiumImageryLayer[] | undefined;
|
|
50
|
+
private setLegends;
|
|
43
51
|
private getBaseLayersCount;
|
|
44
52
|
private findLayerById;
|
|
45
53
|
private updateLayersOrder;
|
|
@@ -22,16 +22,29 @@ var point_geojson_1 = require("./tools/geojson/point.geojson");
|
|
|
22
22
|
var INC = 1;
|
|
23
23
|
var DEC = -1;
|
|
24
24
|
var LayerManager = /** @class */ (function () {
|
|
25
|
-
function LayerManager(mapViewer) {
|
|
25
|
+
function LayerManager(mapViewer, legendsExtractor, onLayersUpdate) {
|
|
26
|
+
var _this = this;
|
|
26
27
|
this.mapViewer = mapViewer;
|
|
27
28
|
// eslint-disable-next-line
|
|
28
29
|
this.layers = this.mapViewer.imageryLayers._layers;
|
|
30
|
+
this.legendsList = [];
|
|
31
|
+
this.legendsExtractor = legendsExtractor;
|
|
32
|
+
this.layerUpdated = new cesium_1.Event();
|
|
33
|
+
if (onLayersUpdate) {
|
|
34
|
+
this.layerUpdated.addEventListener(onLayersUpdate, this);
|
|
35
|
+
}
|
|
36
|
+
this.mapViewer.imageryLayers.layerRemoved.addEventListener(function () {
|
|
37
|
+
_this.setLegends();
|
|
38
|
+
_this.layerUpdated.raiseEvent();
|
|
39
|
+
});
|
|
29
40
|
}
|
|
30
41
|
/* eslint-disable */
|
|
31
42
|
LayerManager.prototype.addMetaToLayer = function (meta, layerPredicate) {
|
|
32
43
|
var layer = this.layers.find(layerPredicate);
|
|
33
44
|
if (layer) {
|
|
34
45
|
layer.meta = meta;
|
|
46
|
+
this.setLegends();
|
|
47
|
+
this.layerUpdated.raiseEvent();
|
|
35
48
|
}
|
|
36
49
|
};
|
|
37
50
|
/* eslint-enable */
|
|
@@ -192,6 +205,11 @@ var LayerManager = /** @class */ (function () {
|
|
|
192
205
|
return ((_a = layer2.meta) === null || _a === void 0 ? void 0 : _a.zIndex) - ((_b = layer1.meta) === null || _b === void 0 ? void 0 : _b.zIndex);
|
|
193
206
|
});
|
|
194
207
|
};
|
|
208
|
+
LayerManager.prototype.setLegends = function () {
|
|
209
|
+
if (typeof this.legendsExtractor !== 'undefined') {
|
|
210
|
+
this.legendsList = this.legendsExtractor(this.layers);
|
|
211
|
+
}
|
|
212
|
+
};
|
|
195
213
|
LayerManager.prototype.getBaseLayersCount = function () {
|
|
196
214
|
var baseLayers = this.layers.filter(function (layer) {
|
|
197
215
|
var parentId = lodash_1.get(layer.meta, 'parentBasetMapId');
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
.mapLegendSidebarContainer {
|
|
2
|
+
width: 340px;
|
|
3
|
+
height: 100%;
|
|
4
|
+
position: relative;
|
|
5
|
+
overflow-y: auto;
|
|
6
|
+
overflow-x: hidden;
|
|
7
|
+
font-size: 16px;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/* Disable drawer animation */
|
|
11
|
+
|
|
12
|
+
.mapLegendSidebarContainer.mdc-drawer--animate {
|
|
13
|
+
transform: translateX(0) !important;
|
|
14
|
+
transition: none !important;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.mapLegendSidebarContainer.mdc-drawer--dismissible {
|
|
18
|
+
position: relative;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
div.MuiPaper-root {
|
|
22
|
+
transition: none !important;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.mapLegendCloseBtn {
|
|
26
|
+
position: absolute;
|
|
27
|
+
top: 0;
|
|
28
|
+
right: 0;
|
|
29
|
+
cursor: pointer;
|
|
30
|
+
width: 50px;
|
|
31
|
+
height: 50px;
|
|
32
|
+
padding: 20px;
|
|
33
|
+
font-size: 24px;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
body[dir='rtl'] .mapLegendCloseBtn {
|
|
37
|
+
right: unset;
|
|
38
|
+
left: 0;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.mapLegendToggleContainer {
|
|
42
|
+
display: flex;
|
|
43
|
+
align-items: center;
|
|
44
|
+
justify-content: center;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.mapLegendIcon {
|
|
48
|
+
width: 2.5rem;
|
|
49
|
+
height: 2.5rem;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.sidebarHeaderContainer {
|
|
53
|
+
text-align: center;
|
|
54
|
+
margin-top: 40px;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.sidebarTitle {
|
|
58
|
+
font-size: 1.5rem;
|
|
59
|
+
font-weight: bold;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.mapLegend {
|
|
63
|
+
display: flex;
|
|
64
|
+
flex-direction: column;
|
|
65
|
+
align-items: center;
|
|
66
|
+
justify-content: center;
|
|
67
|
+
gap: 4px;
|
|
68
|
+
padding: 10px 14px;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.layerNameContainer {
|
|
72
|
+
width: 90%;
|
|
73
|
+
display: flex;
|
|
74
|
+
justify-content: center;
|
|
75
|
+
align-items: center;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.layerName {
|
|
79
|
+
overflow: hidden;
|
|
80
|
+
text-overflow: ellipsis;
|
|
81
|
+
white-space: nowrap;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.legendImg {
|
|
85
|
+
width: 90%;
|
|
86
|
+
height: 150px;
|
|
87
|
+
border: 1px solid black;
|
|
88
|
+
border-radius: 5px;
|
|
89
|
+
object-fit: cover;
|
|
90
|
+
cursor: pointer;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.legendActionsContainer {
|
|
94
|
+
display: flex;
|
|
95
|
+
flex-direction: row;
|
|
96
|
+
align-self: center;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.legendAction:not(:last-child)::after {
|
|
100
|
+
content: '|';
|
|
101
|
+
margin: 0px 4px;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.mapLegendsList {
|
|
105
|
+
display: flex;
|
|
106
|
+
flex-direction: column;
|
|
107
|
+
padding: 20px 0px;
|
|
108
|
+
width: 100%;
|
|
109
|
+
height: 90%;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.legendAction {
|
|
113
|
+
text-decoration: underline;
|
|
114
|
+
cursor: pointer;
|
|
115
|
+
font-size: 1.1rem;
|
|
116
|
+
transition: all 0.1s ease-in-out;
|
|
117
|
+
width: max-content;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.legendAction:hover {
|
|
121
|
+
filter: brightness(1.2);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.noLegendsContainer {
|
|
125
|
+
width: 100%;
|
|
126
|
+
height: 100%;
|
|
127
|
+
display: flex;
|
|
128
|
+
flex-direction: column;
|
|
129
|
+
justify-content: center;
|
|
130
|
+
align-items: center;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.noLegendsMsg {
|
|
134
|
+
text-align: center;
|
|
135
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './MapLegend.css';
|
|
3
|
+
export interface IMapLegend {
|
|
4
|
+
layer?: string;
|
|
5
|
+
legendDoc?: string;
|
|
6
|
+
legendImg?: string;
|
|
7
|
+
legend?: Record<string, unknown>[];
|
|
8
|
+
}
|
|
9
|
+
interface MapLegendProps {
|
|
10
|
+
legend: IMapLegend;
|
|
11
|
+
docText?: string;
|
|
12
|
+
imgText?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare const MapLegend: React.FC<MapLegendProps>;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,57 @@
|
|
|
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.MapLegend = void 0;
|
|
23
|
+
var react_core_1 = require("@map-colonies/react-core");
|
|
24
|
+
var react_1 = __importStar(require("react"));
|
|
25
|
+
var box_1 = require("../../box");
|
|
26
|
+
require("./MapLegend.css");
|
|
27
|
+
var MapLegend = function (_a) {
|
|
28
|
+
var _b = _a.legend, legendImg = _b.legendImg, legendDoc = _b.legendDoc, layer = _b.layer, docText = _a.docText, imgText = _a.imgText;
|
|
29
|
+
var handleLegendImgOpen = react_1.useCallback(function () {
|
|
30
|
+
// Open image in a new tab.
|
|
31
|
+
window.open(legendImg, '_blank');
|
|
32
|
+
}, [legendImg]);
|
|
33
|
+
var handleLegendDocOpen = react_1.useCallback(function () {
|
|
34
|
+
// Open doc in a new tab.
|
|
35
|
+
window.open(legendDoc, '_blank');
|
|
36
|
+
}, [legendDoc]);
|
|
37
|
+
var renderLayerName = react_1.useCallback(function () {
|
|
38
|
+
var MAX_LAYER_NAME_LENGTH = 15;
|
|
39
|
+
var layerNameContainer = (react_1.default.createElement(box_1.Box, { className: "layerNameContainer" },
|
|
40
|
+
react_1.default.createElement("h3", { style: { maxWidth: MAX_LAYER_NAME_LENGTH + "ch" }, className: "layerName" }, layer)));
|
|
41
|
+
if ((layer !== null && layer !== void 0 ? layer : '').length > MAX_LAYER_NAME_LENGTH) {
|
|
42
|
+
return react_1.default.createElement(react_core_1.Tooltip, { content: layer }, layerNameContainer);
|
|
43
|
+
}
|
|
44
|
+
return layerNameContainer;
|
|
45
|
+
}, [layer]);
|
|
46
|
+
var renderLinks = react_1.useCallback(function () {
|
|
47
|
+
return [
|
|
48
|
+
typeof legendImg === 'string' && (react_1.default.createElement("a", { className: "legendAction", href: legendImg, target: "_blank", referrerPolicy: "noreferrer" }, imgText)),
|
|
49
|
+
typeof legendDoc === 'string' && (react_1.default.createElement("a", { className: "legendAction", href: legendDoc, target: "_blank", referrerPolicy: "noreferrer" }, docText)),
|
|
50
|
+
];
|
|
51
|
+
}, [legendImg, imgText, legendDoc, docText]);
|
|
52
|
+
return (react_1.default.createElement(box_1.Box, { className: "mapLegend" },
|
|
53
|
+
renderLayerName(),
|
|
54
|
+
react_1.default.createElement("img", { alt: "Map Legend", className: "legendImg", src: legendImg, onClick: handleLegendImgOpen }),
|
|
55
|
+
react_1.default.createElement(box_1.Box, { className: "legendActionsContainer" }, renderLinks())));
|
|
56
|
+
};
|
|
57
|
+
exports.MapLegend = MapLegend;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IMapLegend } from './MapLegend';
|
|
3
|
+
import './MapLegend.css';
|
|
4
|
+
interface MapLegendListProps {
|
|
5
|
+
legends: IMapLegend[];
|
|
6
|
+
actionsTexts: {
|
|
7
|
+
docText: string;
|
|
8
|
+
imgText: string;
|
|
9
|
+
};
|
|
10
|
+
noLegendsText: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const MapLegendList: React.FC<MapLegendListProps>;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,43 @@
|
|
|
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.MapLegendList = void 0;
|
|
23
|
+
var react_1 = __importStar(require("react"));
|
|
24
|
+
var box_1 = require("../../box");
|
|
25
|
+
var MapLegend_1 = require("./MapLegend");
|
|
26
|
+
require("./MapLegend.css");
|
|
27
|
+
var MapLegendList = function (_a) {
|
|
28
|
+
var legends = _a.legends, _b = _a.actionsTexts, docText = _b.docText, imgText = _b.imgText, noLegendsText = _a.noLegendsText;
|
|
29
|
+
var handleNoLegends = react_1.useCallback(function () {
|
|
30
|
+
return (react_1.default.createElement(box_1.Box, { className: "noLegendsContainer" },
|
|
31
|
+
react_1.default.createElement("h2", { className: "noLegendsMsg" }, noLegendsText)));
|
|
32
|
+
}, [noLegendsText]);
|
|
33
|
+
var renderList = react_1.useCallback(function () {
|
|
34
|
+
if (!legends.length) {
|
|
35
|
+
return handleNoLegends();
|
|
36
|
+
}
|
|
37
|
+
return legends.map(function (legend, i) {
|
|
38
|
+
return (react_1.default.createElement(MapLegend_1.MapLegend, { key: legend.layer + "_" + i, legend: legend, docText: docText, imgText: imgText }));
|
|
39
|
+
});
|
|
40
|
+
}, [legends]);
|
|
41
|
+
return react_1.default.createElement(box_1.Box, { className: "mapLegendsList" }, renderList());
|
|
42
|
+
};
|
|
43
|
+
exports.MapLegendList = MapLegendList;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IMapLegend } from './MapLegend';
|
|
3
|
+
import './MapLegend.css';
|
|
4
|
+
interface MapLegendSidebarProps {
|
|
5
|
+
isOpen: boolean;
|
|
6
|
+
toggleSidebar: () => void;
|
|
7
|
+
title?: string;
|
|
8
|
+
noLegendsText?: string;
|
|
9
|
+
legends?: IMapLegend[];
|
|
10
|
+
actionsTexts?: {
|
|
11
|
+
docText: string;
|
|
12
|
+
imgText: string;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
export declare const MapLegendSidebar: React.FC<MapLegendSidebarProps>;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.MapLegendSidebar = void 0;
|
|
7
|
+
var react_core_1 = require("@map-colonies/react-core");
|
|
8
|
+
var react_1 = __importDefault(require("react"));
|
|
9
|
+
require("./MapLegend.css");
|
|
10
|
+
var MapLegendList_1 = require("./MapLegendList");
|
|
11
|
+
var MapLegendSidebar = function (_a) {
|
|
12
|
+
var isOpen = _a.isOpen, toggleSidebar = _a.toggleSidebar, _b = _a.title, title = _b === void 0 ? 'Map Legends' : _b, _c = _a.noLegendsText, noLegendsText = _c === void 0 ? 'No legends to display...' : _c, _d = _a.legends, legends = _d === void 0 ? [] : _d, _e = _a.actionsTexts, actionsTexts = _e === void 0 ? { docText: 'Docs', imgText: 'View Image' } : _e;
|
|
13
|
+
return isOpen ? (react_1.default.createElement(react_core_1.Drawer, { className: "mapLegendSidebarContainer", modal: false, dismissible: true, open: isOpen },
|
|
14
|
+
react_1.default.createElement(react_core_1.DrawerHeader, { className: "sidebarHeaderContainer" },
|
|
15
|
+
react_1.default.createElement(react_core_1.DrawerTitle, { className: "sidebarTitle" }, title)),
|
|
16
|
+
react_1.default.createElement(react_core_1.DrawerContent, { className: "sidebarContent" },
|
|
17
|
+
react_1.default.createElement(react_core_1.Icon, { onClick: toggleSidebar, className: "mapLegendCloseBtn", icon: { icon: 'close', size: 'small' } }),
|
|
18
|
+
react_1.default.createElement(MapLegendList_1.MapLegendList, { noLegendsText: noLegendsText, legends: legends, actionsTexts: actionsTexts })))) : null;
|
|
19
|
+
};
|
|
20
|
+
exports.MapLegendSidebar = MapLegendSidebar;
|