qwc2 2025.10.13 → 2025.10.15
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/actions/display.js +30 -1
- package/actions/editing.js +22 -1
- package/actions/layerinfo.js +13 -1
- package/actions/layers.js +213 -3
- package/actions/localConfig.js +58 -1
- package/actions/locale.js +21 -1
- package/actions/locate.js +26 -1
- package/actions/logging.js +10 -1
- package/actions/map.js +105 -2
- package/actions/measurement.js +12 -1
- package/actions/processNotifications.js +37 -1
- package/actions/redlining.js +18 -1
- package/actions/redliningPick.js +12 -1
- package/actions/search.js +12 -1
- package/actions/serviceinfo.js +12 -1
- package/actions/task.js +55 -3
- package/actions/theme.js +339 -19
- package/actions/windows.js +164 -5
- package/components/AppMenu.js +435 -3
- package/components/AttributeForm.js +928 -32
- package/components/AttributeTableWidget.js +1105 -13
- package/components/AutoEditForm.js +189 -3
- package/components/CoordinateDisplayer.js +78 -2
- package/components/EditComboField.js +190 -6
- package/components/EditUploadField.js +315 -3
- package/components/ExportSelection.js +203 -2
- package/components/FullscreenSwitcher.js +90 -3
- package/components/Icon.js +81 -2
- package/components/IdentifyViewer.js +1161 -6
- package/components/ImportLayer.js +718 -20
- package/components/LayerInfoWindow.js +145 -2
- package/components/LinkFeatureForm.js +246 -5
- package/components/MapButton.js +88 -2
- package/components/MapSelection.js +287 -8
- package/components/MessageBar.js +68 -2
- package/components/NumericInputWindow.js +359 -2
- package/components/PickFeature.js +266 -2
- package/components/PluginsContainer.js +227 -8
- package/components/PrintSelection.js +620 -49
- package/components/ProcessNotifications.js +104 -2
- package/components/QtDesignerForm.js +1137 -18
- package/components/ResizeableWindow.js +591 -8
- package/components/SearchBox.js +1307 -20
- package/components/ServiceInfoWindow.js +107 -2
- package/components/SideBar.js +204 -4
- package/components/StandardApp.js +381 -20
- package/components/Swipeable.js +15 -1
- package/components/TaskBar.js +85 -2
- package/components/ThemeLayersListWindow.js +216 -4
- package/components/ThemeList.js +381 -7
- package/components/Toolbar.js +106 -2
- package/components/WindowManager.js +178 -2
- package/components/map/OlLayer.js +257 -6
- package/components/map/OlMap.js +405 -5
- package/components/map/layers/BingLayer.js +31 -2
- package/components/map/layers/GoogleLayer.js +222 -19
- package/components/map/layers/GraticuleLayer.js +21 -1
- package/components/map/layers/ImageLayer.js +15 -1
- package/components/map/layers/MVTLayer.js +52 -2
- package/components/map/layers/OSMLayer.js +24 -2
- package/components/map/layers/OverlayLayer.js +55 -3
- package/components/map/layers/VectorLayer.js +173 -8
- package/components/map/layers/WFSLayer.js +220 -6
- package/components/map/layers/WMSLayer.js +180 -6
- package/components/map/layers/WMTSLayer.js +67 -3
- package/components/map/layers/XYZLayer.js +24 -2
- package/components/map/layers/index.js +28 -1
- package/components/map3d/EditDataset3D.js +190 -3
- package/components/map3d/HeightProfile3D.js +402 -3
- package/components/map3d/ImportObjects3D.js +162 -2
- package/components/map3d/Map3D.js +1304 -38
- package/components/map3d/MapControls3D.js +392 -7
- package/components/map3d/SearchField3D.js +183 -11
- package/components/map3d/View3DSwitcher.js +98 -2
- package/components/map3d/drawtool/CreateTool3D.js +174 -4
- package/components/map3d/drawtool/EditTool3D.js +590 -6
- package/components/map3d/drawtool/NumericInput3D.js +336 -4
- package/components/map3d/layers/GeoTIFFLayer3D.js +15 -1
- package/components/map3d/layers/VectorLayer3D.js +53 -2
- package/components/map3d/layers/WFSLayer3D.js +109 -3
- package/components/map3d/layers/WMSLayer3D.js +70 -2
- package/components/map3d/layers/WMTSLayer3D.js +27 -3
- package/components/map3d/layers/index.js +14 -1
- package/components/map3d/utils/FirstPersonControls3D.js +423 -16
- package/components/map3d/utils/MiscUtils3D.js +221 -13
- package/components/map3d/utils/OrbitControls3D.js +176 -5
- package/components/map3d/utils/Tiles3DStyle.js +238 -9
- package/components/share/ShareLink.js +54 -2
- package/components/share/ShareQRCode.js +62 -2
- package/components/share/ShareSocials.js +125 -3
- package/components/timeline/FixedTimeline.js +236 -5
- package/components/timeline/InfiniteTimeline.js +347 -8
- package/components/timeline/TimelineFeaturesSlider.js +439 -5
- package/components/widgets/AccordeonWidget.js +96 -2
- package/components/widgets/ButtonBar.js +124 -2
- package/components/widgets/ColorButton.js +201 -3
- package/components/widgets/ComboBox.js +166 -2
- package/components/widgets/CopyButton.js +110 -2
- package/components/widgets/DateTimeInput.js +100 -3
- package/components/widgets/EditableSelect.js +230 -3
- package/components/widgets/FileSelector.js +128 -4
- package/components/widgets/Input.js +124 -2
- package/components/widgets/InputContainer.js +96 -2
- package/components/widgets/LayerCatalogWidget.js +219 -3
- package/components/widgets/MenuButton.js +157 -1
- package/components/widgets/ModalDialog.js +64 -2
- package/components/widgets/NavBar.js +119 -2
- package/components/widgets/NumberInput.js +226 -4
- package/components/widgets/PopupMenu.js +72 -1
- package/components/widgets/Primitives.js +6 -1
- package/components/widgets/ReCaptchaWidget.js +55 -1
- package/components/widgets/SearchWidget.js +255 -2
- package/components/widgets/Spinner.js +44 -2
- package/components/widgets/SuggestionInput.js +77 -2
- package/components/widgets/TextInput.js +308 -2
- package/components/widgets/ToggleSwitch.js +85 -2
- package/components/widgets/VectorLayerPicker.js +85 -3
- package/libs/openlayers.js +225 -5
- package/package.json +1 -1
- package/plugins/API.js +358 -15
- package/plugins/AttributeTable.js +109 -3
- package/plugins/Authentication.js +130 -5
- package/plugins/BackgroundSwitcher.js +218 -4
- package/plugins/Bookmark.js +289 -3
- package/plugins/BottomBar.js +298 -4
- package/plugins/CookiePopup.js +67 -3
- package/plugins/Cyclomedia.js +442 -5
- package/plugins/Editing.js +497 -9
- package/plugins/FeatureForm.js +366 -4
- package/plugins/FeatureSearch.js +458 -3
- package/plugins/GeometryDigitizer.js +664 -7
- package/plugins/HeightProfile.js +768 -15
- package/plugins/Help.js +102 -3
- package/plugins/HomeButton.js +80 -3
- package/plugins/Identify.js +543 -5
- package/plugins/LayerCatalog.js +215 -4
- package/plugins/LayerTree.js +1194 -6
- package/plugins/LocateButton.js +94 -3
- package/plugins/Map.js +320 -16
- package/plugins/MapCompare.js +94 -3
- package/plugins/MapCopyright.js +127 -5
- package/plugins/MapExport.js +613 -20
- package/plugins/MapFilter.js +868 -12
- package/plugins/MapInfoTooltip.js +277 -3
- package/plugins/MapLegend.js +253 -4
- package/plugins/MapTip.js +290 -4
- package/plugins/Measure.js +220 -4
- package/plugins/NewsPopup.js +137 -3
- package/plugins/OverviewMap.js +167 -7
- package/plugins/Panoramax.js +340 -2
- package/plugins/Portal.js +199 -4
- package/plugins/Print.js +1231 -15
- package/plugins/Redlining.js +750 -6
- package/plugins/Reports.js +332 -3
- package/plugins/Routing.js +1278 -15
- package/plugins/ScratchDrawing.js +173 -5
- package/plugins/Settings.js +241 -4
- package/plugins/Share.js +198 -3
- package/plugins/StartupMarker.js +84 -4
- package/plugins/TaskButton.js +88 -3
- package/plugins/ThemeSwitcher.js +164 -4
- package/plugins/TimeManager.js +971 -10
- package/plugins/TopBar.js +300 -7
- package/plugins/TourGuide.js +213 -2
- package/plugins/ValueTool.js +419 -4
- package/plugins/View3D.js +519 -14
- package/plugins/ZoomButtons.js +165 -3
- package/plugins/map/EditingSupport.js +199 -7
- package/plugins/map/LocateSupport.js +260 -4
- package/plugins/map/MeasurementSupport.js +216 -8
- package/plugins/map/RedliningPickSupport.js +201 -7
- package/plugins/map/RedliningSupport.js +726 -17
- package/plugins/map/SnapInteraction.js +101 -1
- package/plugins/map/SnapSupport.js +210 -2
- package/plugins/map/SnappingSupport.js +356 -17
- package/plugins/map3d/BackgroundSwitcher3D.js +44 -3
- package/plugins/map3d/BottomBar3D.js +118 -3
- package/plugins/map3d/Compare3D.js +422 -8
- package/plugins/map3d/Draw3D.js +353 -6
- package/plugins/map3d/ExportObjects3D.js +393 -18
- package/plugins/map3d/HideObjects3D.js +313 -12
- package/plugins/map3d/Identify3D.js +283 -12
- package/plugins/map3d/LayerTree3D.js +323 -3
- package/plugins/map3d/MapCopyright3D.js +128 -5
- package/plugins/map3d/MapExport3D.js +590 -10
- package/plugins/map3d/MapLight3D.js +553 -6
- package/plugins/map3d/Measure3D.js +571 -20
- package/plugins/map3d/OverviewMap3D.js +169 -3
- package/plugins/map3d/Settings3D.js +73 -3
- package/plugins/map3d/TopBar3D.js +207 -9
- package/plugins/redlining/RedliningBufferSupport.js +206 -3
- package/reducers/display.js +34 -2
- package/reducers/editing.js +68 -3
- package/reducers/index.js +9 -1
- package/reducers/layerinfo.js +26 -2
- package/reducers/layers.js +456 -9
- package/reducers/localConfig.js +122 -2
- package/reducers/locale.js +38 -2
- package/reducers/locate.js +40 -2
- package/reducers/map.js +176 -5
- package/reducers/measurement.js +42 -2
- package/reducers/processNotifications.js +49 -2
- package/reducers/redlining.js +50 -2
- package/reducers/redliningPick.js +27 -2
- package/reducers/search.js +20 -1
- package/reducers/serviceinfo.js +25 -2
- package/reducers/task.js +45 -2
- package/reducers/theme.js +51 -2
- package/reducers/windows.js +203 -2
- package/scripts/dist.sh +1 -1
- package/scripts/gen-plugin-docs.js +152 -2
- package/scripts/makeIconkit.js +85 -6
- package/scripts/themesConfig.js +742 -40
- package/scripts/updateTranslations.js +251 -10
- package/selectors/searchproviders.js +44 -2
- package/stores/StandardStore.js +42 -2
- package/utils/ConfigUtils.js +84 -3
- package/utils/CoordinatesUtils.js +234 -23
- package/utils/DxfUtils.js +237 -11
- package/utils/EditingInterface.js +421 -87
- package/utils/EditingUtils.js +357 -13
- package/utils/ElevationInterface.js +83 -22
- package/utils/FeatureStyles.js +429 -5
- package/utils/IdentifyUtils.js +443 -7
- package/utils/ImageEditor.js +79 -9
- package/utils/LayerUtils.js +1516 -50
- package/utils/LocaleUtils.js +117 -7
- package/utils/MapUtils.js +241 -59
- package/utils/MeasureUtils.js +323 -2
- package/utils/MiscUtils.js +189 -11
- package/utils/PermaLinkUtils.js +429 -6
- package/utils/PluginStore.js +27 -1
- package/utils/ResourceRegistry.js +15 -1
- package/utils/RoutingInterface.js +307 -7
- package/utils/SearchProviders.js +722 -19
- package/utils/ServiceLayerUtils.js +669 -14
- package/utils/Signal.js +32 -2
- package/utils/ThemeUtils.js +341 -7
- package/utils/VectorLayerUtils.js +589 -15
- package/utils/expr_grammar/grammar.js +2239 -2
- package/utils/expr_grammar/test.js +65 -3
|
@@ -1,29 +1,240 @@
|
|
|
1
|
-
function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
3
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
5
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
6
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
7
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
8
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
9
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
10
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
11
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
12
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
13
|
+
/**
|
|
2
14
|
* Copyright 2015 GeoSolutions Sas
|
|
3
15
|
* Copyright 2016-2024 Sourcepole AG
|
|
4
16
|
* All rights reserved.
|
|
5
17
|
*
|
|
6
18
|
* This source code is licensed under the BSD-style license found in the
|
|
7
19
|
* LICENSE file in the root directory of this source tree.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
20
|
+
*/
|
|
21
|
+
import ol from 'openlayers';
|
|
22
|
+
import Proj4js from 'proj4';
|
|
23
|
+
import ConfigUtils from './ConfigUtils';
|
|
24
|
+
import LocaleUtils from './LocaleUtils';
|
|
25
|
+
var crsLabels = {
|
|
26
|
+
"EPSG:4326": "WGS 84",
|
|
27
|
+
"EPSG:3857": "WGS 84 / Pseudo Mercator"
|
|
28
|
+
};
|
|
29
|
+
var commonEsriWktLookup = {
|
|
30
|
+
"EPSG:4326": 'GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]',
|
|
31
|
+
"EPSG:3857": 'PROJCS["WGS_1984_Web_Mercator_Auxiliary_Sphere",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator_Auxiliary_Sphere"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",0.0],PARAMETER["Standard_Parallel_1",0.0],PARAMETER["Auxiliary_Sphere_Type",0.0],UNIT["Meter",1.0]]'
|
|
32
|
+
};
|
|
33
|
+
var CoordinatesUtils = {
|
|
34
|
+
setCrsLabels: function setCrsLabels(labels) {
|
|
35
|
+
Object.assign(crsLabels, labels);
|
|
36
|
+
},
|
|
37
|
+
getAvailableCRS: function getAvailableCRS() {
|
|
38
|
+
var crsList = {};
|
|
39
|
+
for (var a in Proj4js.defs) {
|
|
40
|
+
if (Object.prototype.hasOwnProperty.call(Proj4js.defs, a)) {
|
|
41
|
+
crsList[a] = {
|
|
42
|
+
label: crsLabels[a] || a
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return crsList;
|
|
47
|
+
},
|
|
48
|
+
getUnits: function getUnits(projection) {
|
|
49
|
+
var proj = ol.proj.get(projection);
|
|
50
|
+
return proj.getUnits() || 'degrees';
|
|
51
|
+
},
|
|
52
|
+
getPrecision: function getPrecision(projection) {
|
|
53
|
+
var _precisions$projectio;
|
|
54
|
+
var precisions = ConfigUtils.getConfigProp("projections").reduce(function (res, entry) {
|
|
55
|
+
var _entry$precision;
|
|
56
|
+
return _objectSpread(_objectSpread({}, res), {}, _defineProperty({}, entry.code, (_entry$precision = entry.precision) !== null && _entry$precision !== void 0 ? _entry$precision : 0));
|
|
57
|
+
}, {});
|
|
58
|
+
return (_precisions$projectio = precisions[projection]) !== null && _precisions$projectio !== void 0 ? _precisions$projectio : CoordinatesUtils.getUnits(projection) === 'degrees' ? 4 : 0;
|
|
59
|
+
},
|
|
60
|
+
getProjectionConfig: function getProjectionConfig(projection) {
|
|
61
|
+
var _config$projection;
|
|
62
|
+
var config = ConfigUtils.getConfigProp("projections").reduce(function (res, entry) {
|
|
63
|
+
var _entry$format, _entry$addDirection, _entry$swapLonLat;
|
|
64
|
+
res[entry.code] = {
|
|
65
|
+
format: (_entry$format = entry.format) !== null && _entry$format !== void 0 ? _entry$format : 'decimal',
|
|
66
|
+
addDirection: (_entry$addDirection = entry.addDirection) !== null && _entry$addDirection !== void 0 ? _entry$addDirection : 'none',
|
|
67
|
+
swapLonLat: (_entry$swapLonLat = entry.swapLonLat) !== null && _entry$swapLonLat !== void 0 ? _entry$swapLonLat : false
|
|
68
|
+
};
|
|
69
|
+
return res;
|
|
70
|
+
}, {});
|
|
71
|
+
return (_config$projection = config[projection]) !== null && _config$projection !== void 0 ? _config$projection : {
|
|
72
|
+
format: 'decimal',
|
|
73
|
+
addDirection: 'none',
|
|
74
|
+
swapLonLat: false
|
|
75
|
+
};
|
|
76
|
+
},
|
|
77
|
+
getAxisOrder: function getAxisOrder(projection) {
|
|
78
|
+
var axis = ol.proj.get(projection).getAxisOrientation();
|
|
79
|
+
return axis || 'enu';
|
|
80
|
+
},
|
|
81
|
+
reproject: function reproject(point, source, dest) {
|
|
82
|
+
if (source === dest) {
|
|
83
|
+
return _toConsumableArray(point);
|
|
84
|
+
}
|
|
85
|
+
if (source && dest) {
|
|
86
|
+
var transformed = null;
|
|
87
|
+
try {
|
|
88
|
+
transformed = ol.proj.transform(point, source, dest);
|
|
89
|
+
} catch (e) {
|
|
90
|
+
transformed = [0, 0];
|
|
91
|
+
}
|
|
92
|
+
return transformed;
|
|
93
|
+
}
|
|
94
|
+
return null;
|
|
95
|
+
},
|
|
96
|
+
/**
|
|
97
|
+
* Reprojects a bounding box.
|
|
98
|
+
*
|
|
99
|
+
* @param bbox {array} [minx, miny, maxx, maxy]
|
|
100
|
+
* @param source {string} SRS of the given bbox
|
|
101
|
+
* @param dest {string} SRS of the returned bbox
|
|
102
|
+
*
|
|
103
|
+
* @return {array} [minx, miny, maxx, maxy]
|
|
104
|
+
*/
|
|
105
|
+
reprojectBbox: function reprojectBbox(bbox, source, dest) {
|
|
106
|
+
if (source === dest) {
|
|
107
|
+
return _toConsumableArray(bbox);
|
|
108
|
+
}
|
|
109
|
+
var sw = CoordinatesUtils.reproject([bbox[0], bbox[1]], source, dest);
|
|
110
|
+
var ne = CoordinatesUtils.reproject([bbox[2], bbox[3]], source, dest);
|
|
111
|
+
return [].concat(_toConsumableArray(sw), _toConsumableArray(ne));
|
|
112
|
+
},
|
|
113
|
+
calculateAzimuth: function calculateAzimuth(p1, p2, pj) {
|
|
114
|
+
var p1proj = CoordinatesUtils.reproject(p1, pj, 'EPSG:4326');
|
|
115
|
+
var p2proj = CoordinatesUtils.reproject(p2, pj, 'EPSG:4326');
|
|
116
|
+
var lon1 = p1proj[0] * Math.PI / 180.0;
|
|
117
|
+
var lat1 = p1proj[1] * Math.PI / 180.0;
|
|
118
|
+
var lon2 = p2proj[0] * Math.PI / 180.0;
|
|
119
|
+
var lat2 = p2proj[1] * Math.PI / 180.0;
|
|
120
|
+
var dLon = lon2 - lon1;
|
|
121
|
+
var y = Math.sin(dLon) * Math.cos(lat2);
|
|
122
|
+
var x = Math.cos(lat1) * Math.sin(lat2) - Math.sin(lat1) * Math.cos(lat2) * Math.cos(dLon);
|
|
123
|
+
var azimuth = (Math.atan2(y, x) * 180.0 / Math.PI + 360) % 360;
|
|
124
|
+
return azimuth;
|
|
125
|
+
},
|
|
126
|
+
/**
|
|
127
|
+
* Extend an extent given another one
|
|
128
|
+
*
|
|
129
|
+
* @param extent1 {array} [minx, miny, maxx, maxy]
|
|
130
|
+
* @param extent2 {array} [minx, miny, maxx, maxy]
|
|
131
|
+
*
|
|
132
|
+
* @return {array} [minx, miny, maxx, maxy]
|
|
133
|
+
*/
|
|
134
|
+
extendExtent: function extendExtent(extent1, extent2) {
|
|
135
|
+
return [Math.min(extent1[0], extent2[0]), Math.min(extent1[1], extent2[1]), Math.max(extent1[2], extent2[2]), Math.max(extent1[3], extent2[3])];
|
|
136
|
+
},
|
|
137
|
+
/**
|
|
138
|
+
* Check extent validity
|
|
139
|
+
*
|
|
140
|
+
* @param extent {array} [minx, miny, maxx, maxy]
|
|
141
|
+
*
|
|
142
|
+
* @return {bool}
|
|
143
|
+
*/
|
|
144
|
+
isValidExtent: function isValidExtent(extent) {
|
|
145
|
+
return extent.length === 4 && !(extent.indexOf(Infinity) !== -1 || extent.indexOf(-Infinity) !== -1 || extent.indexOf(NaN) !== -1 || extent[0] >= extent[2] || extent[1] >= extent[3]);
|
|
146
|
+
},
|
|
147
|
+
fromOgcUrnCrs: function fromOgcUrnCrs(crsStr) {
|
|
148
|
+
if (crsStr.endsWith(":CRS84")) {
|
|
149
|
+
return "EPSG:4326";
|
|
150
|
+
}
|
|
151
|
+
var parts = crsStr.split(":");
|
|
152
|
+
return "EPSG:" + parts.slice(-1);
|
|
153
|
+
},
|
|
154
|
+
toOgcUrnCrs: function toOgcUrnCrs(crsStr) {
|
|
155
|
+
var parts = crsStr.split(":");
|
|
156
|
+
return "urn:ogc:def:crs:" + parts[0] + "::" + parts[1];
|
|
157
|
+
},
|
|
158
|
+
getEsriWktFromCrs: function getEsriWktFromCrs(crsStr) {
|
|
159
|
+
var epsgCode = crsStr.startsWith("EPSG:") ? crsStr : CoordinatesUtils.fromOgcUrnCrs(crsStr);
|
|
160
|
+
var projections = ConfigUtils.getConfigProp("projections") || [];
|
|
161
|
+
var configProjection = projections.find(function (proj) {
|
|
162
|
+
return proj.code === epsgCode;
|
|
163
|
+
});
|
|
164
|
+
if (configProjection && configProjection.esriWkt) {
|
|
165
|
+
return configProjection.esriWkt;
|
|
166
|
+
}
|
|
167
|
+
if (commonEsriWktLookup[epsgCode]) {
|
|
168
|
+
return commonEsriWktLookup[epsgCode];
|
|
169
|
+
}
|
|
170
|
+
console.warn("No ESRI WKT definition found for ".concat(epsgCode, ". Shapefile export may not include projection information. Consider adding an 'esriWkt' property to the projection in config.json."));
|
|
171
|
+
return null;
|
|
172
|
+
},
|
|
173
|
+
getFormattedCoordinate: function getFormattedCoordinate(coo, srcCrs) {
|
|
174
|
+
var _options$decimals;
|
|
175
|
+
var dstCrs = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
|
176
|
+
var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
177
|
+
var units = CoordinatesUtils.getUnits(dstCrs !== null && dstCrs !== void 0 ? dstCrs : srcCrs);
|
|
178
|
+
var decimals = (_options$decimals = options.decimals) !== null && _options$decimals !== void 0 ? _options$decimals : CoordinatesUtils.getPrecision(dstCrs !== null && dstCrs !== void 0 ? dstCrs : srcCrs);
|
|
179
|
+
var _ref = function () {
|
|
180
|
+
var config = CoordinatesUtils.getProjectionConfig(dstCrs !== null && dstCrs !== void 0 ? dstCrs : srcCrs);
|
|
181
|
+
return {
|
|
182
|
+
format: units !== 'degrees' ? 'decimal' : config.format,
|
|
183
|
+
addDirection: config.addDirection,
|
|
184
|
+
swapLonLat: config.swapLonLat
|
|
185
|
+
};
|
|
186
|
+
}(),
|
|
187
|
+
format = _ref.format,
|
|
188
|
+
addDirection = _ref.addDirection,
|
|
189
|
+
swapLonLat = _ref.swapLonLat;
|
|
190
|
+
if (srcCrs && dstCrs && srcCrs !== dstCrs) {
|
|
191
|
+
coo = CoordinatesUtils.reproject(coo, srcCrs, dstCrs);
|
|
192
|
+
}
|
|
193
|
+
if (swapLonLat) {
|
|
194
|
+
coo = [coo[1], coo[0]];
|
|
195
|
+
}
|
|
196
|
+
var toDMS = function toDMS(coord) {
|
|
197
|
+
var deg = Math.floor(Math.abs(coord));
|
|
198
|
+
var minFull = (Math.abs(coord) - deg) * 60;
|
|
199
|
+
var min = Math.floor(minFull);
|
|
200
|
+
var sec = ((minFull - min) * 60).toFixed(decimals);
|
|
201
|
+
return "".concat(deg, "\xB0 ").concat(min, "' ").concat(sec, "\"");
|
|
202
|
+
};
|
|
203
|
+
var toDM = function toDM(coord) {
|
|
204
|
+
var deg = Math.floor(Math.abs(coord));
|
|
205
|
+
var min = ((Math.abs(coord) - deg) * 60).toFixed(decimals);
|
|
206
|
+
return "".concat(deg, "\xB0 ").concat(min, "'");
|
|
207
|
+
};
|
|
208
|
+
var formatCoordinate = function formatCoordinate(value, isLat) {
|
|
209
|
+
var direction = '';
|
|
210
|
+
if (addDirection !== 'none') {
|
|
211
|
+
if (isLat) {
|
|
212
|
+
direction = value >= 0 ? 'N' : 'S';
|
|
213
|
+
} else {
|
|
214
|
+
direction = value >= 0 ? 'E' : 'W';
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
var formatted;
|
|
218
|
+
switch (format) {
|
|
219
|
+
case 'dms':
|
|
220
|
+
formatted = toDMS(value, decimals);
|
|
221
|
+
break;
|
|
222
|
+
case 'dm':
|
|
223
|
+
formatted = toDM(value, decimals);
|
|
224
|
+
break;
|
|
225
|
+
default:
|
|
226
|
+
formatted = LocaleUtils.toLocaleFixed(Math.abs(value), decimals);
|
|
227
|
+
}
|
|
228
|
+
if (addDirection === 'prefix') {
|
|
229
|
+
return "".concat(direction).concat(formatted);
|
|
230
|
+
} else if (addDirection === 'suffix') {
|
|
231
|
+
return "".concat(formatted).concat(direction);
|
|
232
|
+
}
|
|
233
|
+
return formatted;
|
|
234
|
+
};
|
|
235
|
+
return coo.map(function (coord, idx) {
|
|
236
|
+
return formatCoordinate(coord, swapLonLat ? idx === 0 : idx === 1);
|
|
237
|
+
}).join(", ");
|
|
238
|
+
}
|
|
239
|
+
};
|
|
240
|
+
export default CoordinatesUtils;
|
package/utils/DxfUtils.js
CHANGED
|
@@ -1,16 +1,242 @@
|
|
|
1
|
-
function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
/**
|
|
2
8
|
* Copyright 2025 Sourcepole AG
|
|
3
9
|
* All rights reserved.
|
|
4
10
|
*
|
|
5
11
|
* This source code is licensed under the BSD-style license found in the
|
|
6
12
|
* LICENSE file in the root directory of this source tree.
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
var
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
var END_MARKERS = {
|
|
16
|
+
SECTION: 'ENDSEC',
|
|
17
|
+
TABLE: 'ENDTAB',
|
|
18
|
+
BLOCK: 'ENDBLK'
|
|
19
|
+
};
|
|
20
|
+
export function explodeDxf(text) {
|
|
21
|
+
var tuples = text.replace(/\s+$/, '').split(/\r\n|\r|\n/g).flatMap(function (_, i, a) {
|
|
22
|
+
return i % 2 ? [] : [a.slice(i, i + 2).map(function (x) {
|
|
23
|
+
return x.trim();
|
|
24
|
+
})];
|
|
25
|
+
});
|
|
26
|
+
var maxHandle = 100; // Value in QGIS
|
|
27
|
+
|
|
28
|
+
var _explode = function explode(pairs) {
|
|
29
|
+
var _toplevelTuples$find;
|
|
30
|
+
var toplevelTuples = [];
|
|
31
|
+
var sectionTuples;
|
|
32
|
+
var marker;
|
|
33
|
+
var expectEndMarker;
|
|
34
|
+
var children = pairs.reduce(function (acc, tuple) {
|
|
35
|
+
if (tuple[0] === '5' && tuple[1] !== '9999999') {
|
|
36
|
+
maxHandle = Math.max(parseInt(tuple[1], 16), maxHandle);
|
|
37
|
+
}
|
|
38
|
+
if (tuple[0] === '0') {
|
|
39
|
+
if (expectEndMarker && tuple[1] === expectEndMarker) {
|
|
40
|
+
acc.push(_objectSpread({
|
|
41
|
+
type: marker
|
|
42
|
+
}, _explode(sectionTuples)));
|
|
43
|
+
sectionTuples = undefined;
|
|
44
|
+
marker = undefined;
|
|
45
|
+
expectEndMarker = undefined;
|
|
46
|
+
} else if (expectEndMarker && tuple[1] !== expectEndMarker) {
|
|
47
|
+
sectionTuples.push(tuple);
|
|
48
|
+
} else if (!expectEndMarker) {
|
|
49
|
+
if (sectionTuples) {
|
|
50
|
+
acc.push(_objectSpread({
|
|
51
|
+
type: marker
|
|
52
|
+
}, _explode(sectionTuples)));
|
|
53
|
+
}
|
|
54
|
+
sectionTuples = [];
|
|
55
|
+
marker = tuple[1];
|
|
56
|
+
expectEndMarker = END_MARKERS[marker];
|
|
57
|
+
}
|
|
58
|
+
} else if (sectionTuples) {
|
|
59
|
+
sectionTuples.push(tuple);
|
|
60
|
+
} else if (acc.length > 0) {
|
|
61
|
+
acc[acc.length - 1].tailValues.push(tuple);
|
|
62
|
+
} else {
|
|
63
|
+
toplevelTuples.push(tuple);
|
|
64
|
+
}
|
|
65
|
+
return acc;
|
|
66
|
+
}, []);
|
|
67
|
+
if (marker && sectionTuples && !expectEndMarker) {
|
|
68
|
+
children.push(_objectSpread({
|
|
69
|
+
type: marker
|
|
70
|
+
}, _explode(sectionTuples)));
|
|
71
|
+
}
|
|
72
|
+
var name = (_toplevelTuples$find = toplevelTuples.find(function (tuple) {
|
|
73
|
+
return tuple[0] === '2';
|
|
74
|
+
})) === null || _toplevelTuples$find === void 0 ? void 0 : _toplevelTuples$find[1];
|
|
75
|
+
return {
|
|
76
|
+
name: name,
|
|
77
|
+
values: toplevelTuples,
|
|
78
|
+
children: children,
|
|
79
|
+
tailValues: []
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
var result = _explode(tuples);
|
|
83
|
+
result.maxHandle = maxHandle;
|
|
84
|
+
return result;
|
|
85
|
+
}
|
|
86
|
+
export function implodeDxf(exploded) {
|
|
87
|
+
var output = "";
|
|
88
|
+
var handleSeed = 100;
|
|
89
|
+
var dumpValues = function dumpValues(values) {
|
|
90
|
+
return values.forEach(function (tuple) {
|
|
91
|
+
if (tuple[0] === '5' && parseInt(tuple[0], 16) >= 100) {
|
|
92
|
+
output += "5\n".concat((handleSeed++).toString(16), "\n");
|
|
93
|
+
} else {
|
|
94
|
+
output += "".concat(tuple[0], "\n").concat(tuple[1], "\n");
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
};
|
|
98
|
+
var _implode = function implode(data) {
|
|
99
|
+
dumpValues(data.values);
|
|
100
|
+
data.children.forEach(function (child) {
|
|
101
|
+
output += "0\n".concat(child.type, "\n");
|
|
102
|
+
_implode(child);
|
|
103
|
+
if (END_MARKERS[child.type]) {
|
|
104
|
+
output += "0\n".concat(END_MARKERS[child.type], "\n");
|
|
105
|
+
}
|
|
106
|
+
dumpValues(child.tailValues);
|
|
107
|
+
});
|
|
108
|
+
};
|
|
109
|
+
_implode(exploded);
|
|
110
|
+
return output;
|
|
111
|
+
}
|
|
112
|
+
export function mergeDxf(documents) {
|
|
113
|
+
var _mergedBlockRecords$c, _mergedBlockRecords$c2, _mergedBlockRecords$c3;
|
|
114
|
+
// Merge blockRecords, Blocks, Layers and Entities of dxf documents
|
|
115
|
+
var mergedEntities = documents[0].children.find(function (child) {
|
|
116
|
+
return child.type === 'SECTION' && child.name === 'ENTITIES';
|
|
117
|
+
});
|
|
118
|
+
var mergedLayers = documents[0].children.find(function (child) {
|
|
119
|
+
return child.type === 'SECTION' && child.name === 'TABLES';
|
|
120
|
+
}).children.find(function (child) {
|
|
121
|
+
return child.type === 'TABLE' && child.name === 'LAYER';
|
|
122
|
+
});
|
|
123
|
+
var mergedBlockRecords = documents[0].children.find(function (child) {
|
|
124
|
+
return child.type === 'SECTION' && child.name === 'TABLES';
|
|
125
|
+
}).children.find(function (child) {
|
|
126
|
+
return child.type === 'TABLE' && child.name === 'BLOCK_RECORD';
|
|
127
|
+
});
|
|
128
|
+
var mergedBlocks = documents[0].children.find(function (child) {
|
|
129
|
+
return child.type === 'SECTION' && child.name === 'BLOCKS';
|
|
130
|
+
});
|
|
131
|
+
// Reference the common block handles of the first document in subsequent documents
|
|
132
|
+
var commonBlockHandles = {
|
|
133
|
+
"*Model_Space": (_mergedBlockRecords$c = mergedBlockRecords.children.find(function (br) {
|
|
134
|
+
return br.name === "*Model_Space";
|
|
135
|
+
})) === null || _mergedBlockRecords$c === void 0 || (_mergedBlockRecords$c = _mergedBlockRecords$c.values) === null || _mergedBlockRecords$c === void 0 || (_mergedBlockRecords$c = _mergedBlockRecords$c.find(function (t) {
|
|
136
|
+
return t[0] === "5";
|
|
137
|
+
})) === null || _mergedBlockRecords$c === void 0 ? void 0 : _mergedBlockRecords$c[1],
|
|
138
|
+
"*Paper_Space": (_mergedBlockRecords$c2 = mergedBlockRecords.children.find(function (br) {
|
|
139
|
+
return br.name === "*Paper_Space";
|
|
140
|
+
})) === null || _mergedBlockRecords$c2 === void 0 || (_mergedBlockRecords$c2 = _mergedBlockRecords$c2.values) === null || _mergedBlockRecords$c2 === void 0 || (_mergedBlockRecords$c2 = _mergedBlockRecords$c2.find(function (t) {
|
|
141
|
+
return t[0] === "5";
|
|
142
|
+
})) === null || _mergedBlockRecords$c2 === void 0 ? void 0 : _mergedBlockRecords$c2[1],
|
|
143
|
+
"*Paper_Space0": (_mergedBlockRecords$c3 = mergedBlockRecords.children.find(function (br) {
|
|
144
|
+
return br.name === "*Paper_Space0";
|
|
145
|
+
})) === null || _mergedBlockRecords$c3 === void 0 || (_mergedBlockRecords$c3 = _mergedBlockRecords$c3.values) === null || _mergedBlockRecords$c3 === void 0 || (_mergedBlockRecords$c3 = _mergedBlockRecords$c3.find(function (t) {
|
|
146
|
+
return t[0] === "5";
|
|
147
|
+
})) === null || _mergedBlockRecords$c3 === void 0 ? void 0 : _mergedBlockRecords$c3[1]
|
|
148
|
+
};
|
|
149
|
+
var maxHandle = documents[0].maxHandle;
|
|
150
|
+
documents.slice(1).forEach(function (document) {
|
|
151
|
+
// Get items to merge
|
|
152
|
+
var entities = document.children.find(function (child) {
|
|
153
|
+
return child.type === 'SECTION' && child.name === 'ENTITIES';
|
|
154
|
+
});
|
|
155
|
+
var layers = document.children.find(function (child) {
|
|
156
|
+
return child.type === 'SECTION' && child.name === 'TABLES';
|
|
157
|
+
}).children.find(function (child) {
|
|
158
|
+
return child.type === 'TABLE' && child.name === 'LAYER';
|
|
159
|
+
});
|
|
160
|
+
var blockRecords = document.children.find(function (child) {
|
|
161
|
+
return child.type === 'SECTION' && child.name === 'TABLES';
|
|
162
|
+
}).children.find(function (child) {
|
|
163
|
+
return child.type === 'TABLE' && child.name === 'BLOCK_RECORD';
|
|
164
|
+
});
|
|
165
|
+
var blocks = document.children.find(function (child) {
|
|
166
|
+
return child.type === 'SECTION' && child.name === 'BLOCKS';
|
|
167
|
+
});
|
|
168
|
+
var handleMapping = {};
|
|
169
|
+
|
|
170
|
+
// Merge items, adjusting handles as necessary to avoid conflicting handles
|
|
171
|
+
blockRecords.children.forEach(function (blockRecord) {
|
|
172
|
+
var handleTuple = blockRecord.values.find(function (tuple) {
|
|
173
|
+
return tuple[0] === "5";
|
|
174
|
+
});
|
|
175
|
+
if (["*Model_Space", "*Paper_Space", "*Paper_Space0"].includes(blockRecord.name)) {
|
|
176
|
+
handleMapping[handleTuple[1]] = commonBlockHandles[blockRecord.name];
|
|
177
|
+
} else {
|
|
178
|
+
var newHandle = (++maxHandle).toString(16);
|
|
179
|
+
handleMapping[handleTuple[1]] = newHandle;
|
|
180
|
+
handleTuple[1] = newHandle;
|
|
181
|
+
mergedBlockRecords.children.push(blockRecord);
|
|
182
|
+
}
|
|
183
|
+
});
|
|
184
|
+
blocks.children.forEach(function (block) {
|
|
185
|
+
// Note: Don't merge common blocks
|
|
186
|
+
if (!["*Model_Space", "*Paper_Space", "*Paper_Space0"].includes(block.name)) {
|
|
187
|
+
var handleRefTuple = block.values.find(function (tuple) {
|
|
188
|
+
return tuple[0] === "330";
|
|
189
|
+
});
|
|
190
|
+
if (handleRefTuple) {
|
|
191
|
+
handleRefTuple[1] = handleMapping[handleRefTuple[1]];
|
|
192
|
+
}
|
|
193
|
+
block.values.find(function (tuple) {
|
|
194
|
+
return tuple[0] === "5";
|
|
195
|
+
})[1] = (++maxHandle).toString(16);
|
|
196
|
+
mergedBlocks.children.push(block);
|
|
197
|
+
}
|
|
198
|
+
});
|
|
199
|
+
layers.children.forEach(function (layer) {
|
|
200
|
+
// Note: Don't merge dummy layer 0
|
|
201
|
+
if (layer.name !== '0') {
|
|
202
|
+
layer.values.find(function (tuple) {
|
|
203
|
+
return tuple[0] === "5";
|
|
204
|
+
})[1] = (++maxHandle).toString(16);
|
|
205
|
+
mergedLayers.children.push(layer);
|
|
206
|
+
}
|
|
207
|
+
});
|
|
208
|
+
entities.children.forEach(function (entity) {
|
|
209
|
+
var handleRefTuple = entity.values.find(function (tuple) {
|
|
210
|
+
return tuple[0] === "330";
|
|
211
|
+
});
|
|
212
|
+
if (handleRefTuple) {
|
|
213
|
+
handleRefTuple[1] = handleMapping[handleRefTuple[1]];
|
|
214
|
+
}
|
|
215
|
+
var handleTuple = entity.values.find(function (tuple) {
|
|
216
|
+
return tuple[0] === "5";
|
|
217
|
+
});
|
|
218
|
+
var newHandle = (++maxHandle).toString(16);
|
|
219
|
+
handleMapping[handleTuple[1]] = newHandle;
|
|
220
|
+
handleTuple[1] = newHandle;
|
|
221
|
+
// VERTEX, SEQEND
|
|
222
|
+
entity.children.forEach(function (child) {
|
|
223
|
+
child.values.find(function (tuple) {
|
|
224
|
+
return tuple[0] === "5";
|
|
225
|
+
})[1] = (++maxHandle).toString(16);
|
|
226
|
+
var childHandleRefTuple = child.values.find(function (tuple) {
|
|
227
|
+
return tuple[0] === "330";
|
|
228
|
+
});
|
|
229
|
+
if (childHandleRefTuple) {
|
|
230
|
+
childHandleRefTuple[1] = handleMapping[childHandleRefTuple[1]];
|
|
231
|
+
}
|
|
232
|
+
});
|
|
233
|
+
mergedEntities.children.push(entity);
|
|
234
|
+
});
|
|
235
|
+
});
|
|
236
|
+
|
|
237
|
+
// Update layer count
|
|
238
|
+
mergedLayers.values.find(function (tuple) {
|
|
239
|
+
return tuple[0] === "70";
|
|
240
|
+
})[1] = String(mergedLayers.children.length);
|
|
241
|
+
return documents[0];
|
|
242
|
+
}
|