@corpsmap/corpsmap 3.0.12 → 3.0.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/lib/dev.js +369 -218
- package/lib/prod.js +369 -218
- package/package.json +4 -1
- package/src/application-bundles/map-layers-bundle.js +6 -0
- package/src/application-controls/tree-list-folder.js +45 -27
- package/src/core-plugins/add-data/bundle.js +18 -4
- package/src/core-plugins/identify-arcgis-rest/bundle.js +2 -1
- package/src/core-plugins/legend/bundle.js +9 -3
- package/src/core-plugins/print-map/bundle.js +21 -1
- package/src/core-plugins/tree-view/download-bundle.js +2 -2
- package/src/core-plugins/tree-view/layer-subpanel/layer-subpanel.js +9 -1
- package/src/core-plugins/tree-view/tree-list-item-dataset.js +14 -3
- package/src/openlayers-utils/format-utilities.js +13 -0
- package/src/utils/load-plugins.test.js +36 -0
package/lib/prod.js
CHANGED
|
@@ -195,6 +195,10 @@ function _createSuper(Derived) {
|
|
|
195
195
|
};
|
|
196
196
|
}
|
|
197
197
|
|
|
198
|
+
function _slicedToArray(arr, i) {
|
|
199
|
+
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
200
|
+
}
|
|
201
|
+
|
|
198
202
|
function _toConsumableArray(arr) {
|
|
199
203
|
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
200
204
|
}
|
|
@@ -203,10 +207,44 @@ function _arrayWithoutHoles(arr) {
|
|
|
203
207
|
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
204
208
|
}
|
|
205
209
|
|
|
210
|
+
function _arrayWithHoles(arr) {
|
|
211
|
+
if (Array.isArray(arr)) return arr;
|
|
212
|
+
}
|
|
213
|
+
|
|
206
214
|
function _iterableToArray(iter) {
|
|
207
215
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
208
216
|
}
|
|
209
217
|
|
|
218
|
+
function _iterableToArrayLimit(arr, i) {
|
|
219
|
+
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
220
|
+
|
|
221
|
+
if (_i == null) return;
|
|
222
|
+
var _arr = [];
|
|
223
|
+
var _n = true;
|
|
224
|
+
var _d = false;
|
|
225
|
+
|
|
226
|
+
var _s, _e;
|
|
227
|
+
|
|
228
|
+
try {
|
|
229
|
+
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
|
|
230
|
+
_arr.push(_s.value);
|
|
231
|
+
|
|
232
|
+
if (i && _arr.length === i) break;
|
|
233
|
+
}
|
|
234
|
+
} catch (err) {
|
|
235
|
+
_d = true;
|
|
236
|
+
_e = err;
|
|
237
|
+
} finally {
|
|
238
|
+
try {
|
|
239
|
+
if (!_n && _i["return"] != null) _i["return"]();
|
|
240
|
+
} finally {
|
|
241
|
+
if (_d) throw _e;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
return _arr;
|
|
246
|
+
}
|
|
247
|
+
|
|
210
248
|
function _unsupportedIterableToArray(o, minLen) {
|
|
211
249
|
if (!o) return;
|
|
212
250
|
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
@@ -228,6 +266,10 @@ function _nonIterableSpread() {
|
|
|
228
266
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
229
267
|
}
|
|
230
268
|
|
|
269
|
+
function _nonIterableRest() {
|
|
270
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
271
|
+
}
|
|
272
|
+
|
|
231
273
|
var CONTEXT_TYPES = {
|
|
232
274
|
store: function () {}
|
|
233
275
|
};
|
|
@@ -5270,6 +5312,9 @@ function createObjectIterator(obj) {
|
|
|
5270
5312
|
var len = okeys.length;
|
|
5271
5313
|
return function next() {
|
|
5272
5314
|
var key = okeys[++i];
|
|
5315
|
+
if (key === '__proto__') {
|
|
5316
|
+
return next();
|
|
5317
|
+
}
|
|
5273
5318
|
return i < len ? { value: obj[key], key: key } : null;
|
|
5274
5319
|
};
|
|
5275
5320
|
}
|
|
@@ -28687,7 +28732,7 @@ function getUid(obj) {
|
|
|
28687
28732
|
* OpenLayers version.
|
|
28688
28733
|
* @type {string}
|
|
28689
28734
|
*/
|
|
28690
|
-
var VERSION = '6.
|
|
28735
|
+
var VERSION = '6.14.1';
|
|
28691
28736
|
|
|
28692
28737
|
var __extends = (undefined && undefined.__extends) || (function () {
|
|
28693
28738
|
var extendStatics = function (d, b) {
|
|
@@ -31060,6 +31105,13 @@ var FIREFOX = ua.indexOf('firefox') !== -1;
|
|
|
31060
31105
|
* @type {boolean}
|
|
31061
31106
|
*/
|
|
31062
31107
|
var SAFARI = ua.indexOf('safari') !== -1 && ua.indexOf('chrom') == -1;
|
|
31108
|
+
/**
|
|
31109
|
+
* https://bugs.webkit.org/show_bug.cgi?id=237906
|
|
31110
|
+
* @type {boolean}
|
|
31111
|
+
*/
|
|
31112
|
+
var SAFARI_BUG_237906 = SAFARI &&
|
|
31113
|
+
!!(ua.indexOf('version/15.4') >= 0 ||
|
|
31114
|
+
ua.match(/cpu (os|iphone os) 15_4 like mac os x/));
|
|
31063
31115
|
/**
|
|
31064
31116
|
* User agent string says we are dealing with a WebKit engine.
|
|
31065
31117
|
* @type {boolean}
|
|
@@ -36013,7 +36065,7 @@ function fromUserCoordinate(coordinate, destProjection) {
|
|
|
36013
36065
|
coordinate[1] <= 90) {
|
|
36014
36066
|
showCoordinateWarning = false;
|
|
36015
36067
|
// eslint-disable-next-line no-console
|
|
36016
|
-
console.warn('Call useGeographic() ol/proj once to work with [longitude, latitude] coordinates.');
|
|
36068
|
+
console.warn('Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.');
|
|
36017
36069
|
}
|
|
36018
36070
|
return coordinate;
|
|
36019
36071
|
}
|
|
@@ -44015,7 +44067,6 @@ var __extends$s = (undefined && undefined.__extends) || (function () {
|
|
|
44015
44067
|
* @typedef {Object} State
|
|
44016
44068
|
* @property {import("./Layer.js").default} layer Layer.
|
|
44017
44069
|
* @property {number} opacity Opacity, the value is rounded to two digits to appear after the decimal point.
|
|
44018
|
-
* @property {import("../source/Source.js").default|undefined} source Source being rendered (only for multi-source layers).
|
|
44019
44070
|
* @property {boolean} visible Visible.
|
|
44020
44071
|
* @property {boolean} managed Managed.
|
|
44021
44072
|
* @property {import("../extent.js").Extent} [extent] Extent.
|
|
@@ -44285,7 +44336,7 @@ var Layer = /** @class */ (function (_super) {
|
|
|
44285
44336
|
};
|
|
44286
44337
|
/**
|
|
44287
44338
|
* Get the renderer for this layer.
|
|
44288
|
-
* @return {RendererType} The layer renderer.
|
|
44339
|
+
* @return {RendererType|null} The layer renderer.
|
|
44289
44340
|
*/
|
|
44290
44341
|
Layer.prototype.getRenderer = function () {
|
|
44291
44342
|
if (!this.renderer_) {
|
|
@@ -45973,11 +46024,13 @@ var CanvasImageLayerRenderer = /** @class */ (function (_super) {
|
|
|
45973
46024
|
if (imageSource) {
|
|
45974
46025
|
var projection = viewState.projection;
|
|
45975
46026
|
var image = imageSource.getImage(renderedExtent, viewResolution, pixelRatio, projection);
|
|
45976
|
-
if (image
|
|
45977
|
-
this.
|
|
45978
|
-
|
|
45979
|
-
|
|
45980
|
-
|
|
46027
|
+
if (image) {
|
|
46028
|
+
if (this.loadImage(image)) {
|
|
46029
|
+
this.image_ = image;
|
|
46030
|
+
}
|
|
46031
|
+
else if (image.getState() === ImageState.EMPTY) {
|
|
46032
|
+
this.image_ = null;
|
|
46033
|
+
}
|
|
45981
46034
|
}
|
|
45982
46035
|
}
|
|
45983
46036
|
else {
|
|
@@ -53049,7 +53102,7 @@ var Text = /** @class */ (function () {
|
|
|
53049
53102
|
/**
|
|
53050
53103
|
* Set the text.
|
|
53051
53104
|
*
|
|
53052
|
-
* @param {string|undefined} text Text.
|
|
53105
|
+
* @param {string|Array<string>|undefined} text Text.
|
|
53053
53106
|
* @api
|
|
53054
53107
|
*/
|
|
53055
53108
|
Text.prototype.setText = function (text) {
|
|
@@ -59954,6 +60007,9 @@ function createObjectIterator(obj) {
|
|
|
59954
60007
|
var len = okeys.length;
|
|
59955
60008
|
return function next() {
|
|
59956
60009
|
var key = okeys[++i];
|
|
60010
|
+
if (key === '__proto__') {
|
|
60011
|
+
return next();
|
|
60012
|
+
}
|
|
59957
60013
|
return i < len ? {value: obj[key], key: key} : null;
|
|
59958
60014
|
};
|
|
59959
60015
|
}
|
|
@@ -66693,9 +66749,21 @@ var MapEventType = {
|
|
|
66693
66749
|
* @api
|
|
66694
66750
|
*/
|
|
66695
66751
|
MOVEEND: 'moveend',
|
|
66752
|
+
/**
|
|
66753
|
+
* Triggered when loading of additional map data (tiles, images, features) starts.
|
|
66754
|
+
* @event module:ol/render/Event~RenderEvent#loadstart
|
|
66755
|
+
* @api
|
|
66756
|
+
*/
|
|
66757
|
+
LOADSTART: 'loadstart',
|
|
66758
|
+
/**
|
|
66759
|
+
* Triggered when loading of additional map data has completed.
|
|
66760
|
+
* @event module:ol/render/Event~RenderEvent#loadend
|
|
66761
|
+
* @api
|
|
66762
|
+
*/
|
|
66763
|
+
LOADEND: 'loadend',
|
|
66696
66764
|
};
|
|
66697
66765
|
/***
|
|
66698
|
-
* @typedef {'postrender'|'movestart'|'moveend'} Types
|
|
66766
|
+
* @typedef {'postrender'|'movestart'|'moveend'|'loadstart'|'loadend'} Types
|
|
66699
66767
|
*/
|
|
66700
66768
|
|
|
66701
66769
|
/**
|
|
@@ -67779,15 +67847,15 @@ var View = /** @class */ (function (_super) {
|
|
|
67779
67847
|
* @type {import("./coordinate.js").Coordinate|undefined}
|
|
67780
67848
|
*/
|
|
67781
67849
|
_this.cancelAnchor_ = undefined;
|
|
67850
|
+
if (options.projection) {
|
|
67851
|
+
disableCoordinateWarning();
|
|
67852
|
+
}
|
|
67782
67853
|
if (options.center) {
|
|
67783
67854
|
options.center = fromUserCoordinate(options.center, _this.projection_);
|
|
67784
67855
|
}
|
|
67785
67856
|
if (options.extent) {
|
|
67786
67857
|
options.extent = fromUserExtent(options.extent, _this.projection_);
|
|
67787
67858
|
}
|
|
67788
|
-
if (options.projection) {
|
|
67789
|
-
disableCoordinateWarning();
|
|
67790
|
-
}
|
|
67791
67859
|
_this.applyOptions_(options);
|
|
67792
67860
|
return _this;
|
|
67793
67861
|
}
|
|
@@ -69406,9 +69474,14 @@ var PluggableMap = /** @class */ (function (_super) {
|
|
|
69406
69474
|
var optionsInternal = createOptionsInternal(options);
|
|
69407
69475
|
/**
|
|
69408
69476
|
* @private
|
|
69409
|
-
* @type {boolean}
|
|
69477
|
+
* @type {boolean|undefined}
|
|
69410
69478
|
*/
|
|
69411
69479
|
_this.renderComplete_;
|
|
69480
|
+
/**
|
|
69481
|
+
* @private
|
|
69482
|
+
* @type {boolean}
|
|
69483
|
+
*/
|
|
69484
|
+
_this.loaded_ = true;
|
|
69412
69485
|
/** @private */
|
|
69413
69486
|
_this.boundHandleBrowserEvent_ = _this.handleBrowserEvent.bind(_this);
|
|
69414
69487
|
/**
|
|
@@ -69560,7 +69633,7 @@ var PluggableMap = /** @class */ (function (_super) {
|
|
|
69560
69633
|
*/
|
|
69561
69634
|
_this.overlayIdIndex_ = {};
|
|
69562
69635
|
/**
|
|
69563
|
-
* @type {import("./renderer/Map.js").default}
|
|
69636
|
+
* @type {import("./renderer/Map.js").default|null}
|
|
69564
69637
|
* @private
|
|
69565
69638
|
*/
|
|
69566
69639
|
_this.renderer_ = null;
|
|
@@ -69746,7 +69819,7 @@ var PluggableMap = /** @class */ (function (_super) {
|
|
|
69746
69819
|
* @api
|
|
69747
69820
|
*/
|
|
69748
69821
|
PluggableMap.prototype.forEachFeatureAtPixel = function (pixel, callback, opt_options) {
|
|
69749
|
-
if (!this.frameState_) {
|
|
69822
|
+
if (!this.frameState_ || !this.renderer_) {
|
|
69750
69823
|
return;
|
|
69751
69824
|
}
|
|
69752
69825
|
var coordinate = this.getCoordinateFromPixelInternal(pixel);
|
|
@@ -69820,7 +69893,7 @@ var PluggableMap = /** @class */ (function (_super) {
|
|
|
69820
69893
|
* @deprecated
|
|
69821
69894
|
*/
|
|
69822
69895
|
PluggableMap.prototype.forEachLayerAtPixel = function (pixel, callback, opt_options) {
|
|
69823
|
-
if (!this.frameState_) {
|
|
69896
|
+
if (!this.frameState_ || !this.renderer_) {
|
|
69824
69897
|
return;
|
|
69825
69898
|
}
|
|
69826
69899
|
var options = opt_options || {};
|
|
@@ -69837,7 +69910,7 @@ var PluggableMap = /** @class */ (function (_super) {
|
|
|
69837
69910
|
* @api
|
|
69838
69911
|
*/
|
|
69839
69912
|
PluggableMap.prototype.hasFeatureAtPixel = function (pixel, opt_options) {
|
|
69840
|
-
if (!this.frameState_) {
|
|
69913
|
+
if (!this.frameState_ || !this.renderer_) {
|
|
69841
69914
|
return false;
|
|
69842
69915
|
}
|
|
69843
69916
|
var coordinate = this.getCoordinateFromPixelInternal(pixel);
|
|
@@ -70017,11 +70090,15 @@ var PluggableMap = /** @class */ (function (_super) {
|
|
|
70017
70090
|
PluggableMap.prototype.getLoadingOrNotReady = function () {
|
|
70018
70091
|
var layerStatesArray = this.getLayerGroup().getLayerStatesArray();
|
|
70019
70092
|
for (var i = 0, ii = layerStatesArray.length; i < ii; ++i) {
|
|
70020
|
-
var
|
|
70021
|
-
if (!
|
|
70093
|
+
var state = layerStatesArray[i];
|
|
70094
|
+
if (!state.visible) {
|
|
70095
|
+
continue;
|
|
70096
|
+
}
|
|
70097
|
+
var renderer = state.layer.getRenderer();
|
|
70098
|
+
if (renderer && !renderer.ready) {
|
|
70022
70099
|
return true;
|
|
70023
70100
|
}
|
|
70024
|
-
var source = /** @type {import("./layer/Layer.js").default} */ (layer).getSource();
|
|
70101
|
+
var source = /** @type {import("./layer/Layer.js").default} */ (state.layer).getSource();
|
|
70025
70102
|
if (source && source.loading) {
|
|
70026
70103
|
return true;
|
|
70027
70104
|
}
|
|
@@ -70056,7 +70133,7 @@ var PluggableMap = /** @class */ (function (_super) {
|
|
|
70056
70133
|
};
|
|
70057
70134
|
/**
|
|
70058
70135
|
* Get the map renderer.
|
|
70059
|
-
* @return {import("./renderer/Map.js").default} Renderer
|
|
70136
|
+
* @return {import("./renderer/Map.js").default|null} Renderer
|
|
70060
70137
|
*/
|
|
70061
70138
|
PluggableMap.prototype.getRenderer = function () {
|
|
70062
70139
|
return this.renderer_;
|
|
@@ -70213,11 +70290,20 @@ var PluggableMap = /** @class */ (function (_super) {
|
|
|
70213
70290
|
tileQueue.loadMoreTiles(maxTotalLoading, maxNewLoads);
|
|
70214
70291
|
}
|
|
70215
70292
|
}
|
|
70216
|
-
if (frameState &&
|
|
70217
|
-
this.
|
|
70218
|
-
|
|
70219
|
-
|
|
70220
|
-
|
|
70293
|
+
if (frameState && this.renderer_ && !frameState.animate) {
|
|
70294
|
+
if (this.renderComplete_ === true) {
|
|
70295
|
+
if (this.hasListener(RenderEventType.RENDERCOMPLETE)) {
|
|
70296
|
+
this.renderer_.dispatchRenderEvent(RenderEventType.RENDERCOMPLETE, frameState);
|
|
70297
|
+
}
|
|
70298
|
+
if (this.loaded_ === false) {
|
|
70299
|
+
this.loaded_ = true;
|
|
70300
|
+
this.dispatchEvent(new MapEvent(MapEventType.LOADEND, this, frameState));
|
|
70301
|
+
}
|
|
70302
|
+
}
|
|
70303
|
+
else if (this.loaded_ === true) {
|
|
70304
|
+
this.loaded_ = false;
|
|
70305
|
+
this.dispatchEvent(new MapEvent(MapEventType.LOADSTART, this, frameState));
|
|
70306
|
+
}
|
|
70221
70307
|
}
|
|
70222
70308
|
var postRenderFunctions = this.postRenderFunctions_;
|
|
70223
70309
|
for (var i = 0, ii = postRenderFunctions.length; i < ii; ++i) {
|
|
@@ -70473,7 +70559,7 @@ var PluggableMap = /** @class */ (function (_super) {
|
|
|
70473
70559
|
}
|
|
70474
70560
|
}
|
|
70475
70561
|
this.frameState_ = frameState;
|
|
70476
|
-
this.renderer_.renderFrame(frameState);
|
|
70562
|
+
/** @type {import("./renderer/Map.js").default} */ (this.renderer_).renderFrame(frameState);
|
|
70477
70563
|
if (frameState) {
|
|
70478
70564
|
if (frameState.animate) {
|
|
70479
70565
|
this.render();
|
|
@@ -70499,9 +70585,13 @@ var PluggableMap = /** @class */ (function (_super) {
|
|
|
70499
70585
|
}
|
|
70500
70586
|
this.dispatchEvent(new MapEvent(MapEventType.POSTRENDER, this, frameState));
|
|
70501
70587
|
this.renderComplete_ =
|
|
70502
|
-
|
|
70503
|
-
|
|
70504
|
-
|
|
70588
|
+
this.hasListener(MapEventType.LOADSTART) ||
|
|
70589
|
+
this.hasListener(MapEventType.LOADEND) ||
|
|
70590
|
+
this.hasListener(RenderEventType.RENDERCOMPLETE)
|
|
70591
|
+
? !this.tileQueue_.getTilesLoading() &&
|
|
70592
|
+
!this.tileQueue_.getCount() &&
|
|
70593
|
+
!this.getLoadingOrNotReady()
|
|
70594
|
+
: undefined;
|
|
70505
70595
|
if (!this.postRenderTimeoutHandle_) {
|
|
70506
70596
|
this.postRenderTimeoutHandle_ = setTimeout(function () {
|
|
70507
70597
|
_this.postRenderTimeoutHandle_ = undefined;
|
|
@@ -78060,7 +78150,6 @@ var __extends$1v = (undefined && undefined.__extends) || (function () {
|
|
|
78060
78150
|
})();
|
|
78061
78151
|
/**
|
|
78062
78152
|
* @typedef {Object} Result
|
|
78063
|
-
* @property {boolean} snapped Snapped.
|
|
78064
78153
|
* @property {import("../coordinate.js").Coordinate|null} vertex Vertex.
|
|
78065
78154
|
* @property {import("../pixel.js").Pixel|null} vertexPixel VertexPixel.
|
|
78066
78155
|
*/
|
|
@@ -78194,18 +78283,18 @@ var Snap = /** @class */ (function (_super) {
|
|
|
78194
78283
|
/**
|
|
78195
78284
|
* @const
|
|
78196
78285
|
* @private
|
|
78197
|
-
* @type {Object<string, function(import(
|
|
78198
|
-
*/
|
|
78199
|
-
_this.
|
|
78200
|
-
'Point': _this.
|
|
78201
|
-
'LineString': _this.
|
|
78202
|
-
'LinearRing': _this.
|
|
78203
|
-
'Polygon': _this.
|
|
78204
|
-
'MultiPoint': _this.
|
|
78205
|
-
'MultiLineString': _this.
|
|
78206
|
-
'MultiPolygon': _this.
|
|
78207
|
-
'GeometryCollection': _this.
|
|
78208
|
-
'Circle': _this.
|
|
78286
|
+
* @type {Object<string, function(Array<Array<import('../coordinate.js').Coordinate>>, import("../geom/Geometry.js").default): void>}
|
|
78287
|
+
*/
|
|
78288
|
+
_this.GEOMETRY_SEGMENTERS_ = {
|
|
78289
|
+
'Point': _this.segmentPointGemetry_.bind(_this),
|
|
78290
|
+
'LineString': _this.segmentLineStringGemetry_.bind(_this),
|
|
78291
|
+
'LinearRing': _this.segmentLineStringGemetry_.bind(_this),
|
|
78292
|
+
'Polygon': _this.segmentPolygonGemetry_.bind(_this),
|
|
78293
|
+
'MultiPoint': _this.segmentMultiPointGemetry_.bind(_this),
|
|
78294
|
+
'MultiLineString': _this.segmentMultiLineStringGemetry_.bind(_this),
|
|
78295
|
+
'MultiPolygon': _this.segmentMultiPolygonGemetry_.bind(_this),
|
|
78296
|
+
'GeometryCollection': _this.segmentGeometryCollectionGemetry_.bind(_this),
|
|
78297
|
+
'Circle': _this.segmentCircleGemetry_.bind(_this),
|
|
78209
78298
|
};
|
|
78210
78299
|
return _this;
|
|
78211
78300
|
}
|
|
@@ -78221,10 +78310,26 @@ var Snap = /** @class */ (function (_super) {
|
|
|
78221
78310
|
var feature_uid = getUid(feature);
|
|
78222
78311
|
var geometry = feature.getGeometry();
|
|
78223
78312
|
if (geometry) {
|
|
78224
|
-
var
|
|
78225
|
-
if (
|
|
78313
|
+
var segmenter = this.GEOMETRY_SEGMENTERS_[geometry.getType()];
|
|
78314
|
+
if (segmenter) {
|
|
78226
78315
|
this.indexedFeaturesExtents_[feature_uid] = geometry.getExtent(createEmpty());
|
|
78227
|
-
|
|
78316
|
+
var segments =
|
|
78317
|
+
/** @type {Array<Array<import('../coordinate.js').Coordinate>>} */ ([]);
|
|
78318
|
+
segmenter(segments, geometry);
|
|
78319
|
+
if (segments.length === 1) {
|
|
78320
|
+
this.rBush_.insert(boundingExtent(segments[0]), {
|
|
78321
|
+
feature: feature,
|
|
78322
|
+
segment: segments[0],
|
|
78323
|
+
});
|
|
78324
|
+
}
|
|
78325
|
+
else if (segments.length > 1) {
|
|
78326
|
+
var extents = segments.map(function (s) { return boundingExtent(s); });
|
|
78327
|
+
var segmentsData = segments.map(function (segment) { return ({
|
|
78328
|
+
feature: feature,
|
|
78329
|
+
segment: segment,
|
|
78330
|
+
}); });
|
|
78331
|
+
this.rBush_.load(extents, segmentsData);
|
|
78332
|
+
}
|
|
78228
78333
|
}
|
|
78229
78334
|
}
|
|
78230
78335
|
if (register) {
|
|
@@ -78265,7 +78370,7 @@ var Snap = /** @class */ (function (_super) {
|
|
|
78265
78370
|
*/
|
|
78266
78371
|
Snap.prototype.handleEvent = function (evt) {
|
|
78267
78372
|
var result = this.snapTo(evt.pixel, evt.coordinate, evt.map);
|
|
78268
|
-
if (result
|
|
78373
|
+
if (result) {
|
|
78269
78374
|
evt.coordinate = result.vertex.slice(0, 2);
|
|
78270
78375
|
evt.pixel = result.vertexPixel;
|
|
78271
78376
|
}
|
|
@@ -78374,7 +78479,7 @@ var Snap = /** @class */ (function (_super) {
|
|
|
78374
78479
|
* @param {import("../pixel.js").Pixel} pixel Pixel
|
|
78375
78480
|
* @param {import("../coordinate.js").Coordinate} pixelCoordinate Coordinate
|
|
78376
78481
|
* @param {import("../PluggableMap.js").default} map Map.
|
|
78377
|
-
* @return {Result} Snap result
|
|
78482
|
+
* @return {Result|null} Snap result
|
|
78378
78483
|
*/
|
|
78379
78484
|
Snap.prototype.snapTo = function (pixel, pixelCoordinate, map) {
|
|
78380
78485
|
var lowerLeft = map.getCoordinateFromPixel([
|
|
@@ -78387,96 +78492,88 @@ var Snap = /** @class */ (function (_super) {
|
|
|
78387
78492
|
]);
|
|
78388
78493
|
var box = boundingExtent([lowerLeft, upperRight]);
|
|
78389
78494
|
var segments = this.rBush_.getInExtent(box);
|
|
78390
|
-
|
|
78391
|
-
if (
|
|
78392
|
-
|
|
78393
|
-
return segment.feature.getGeometry().getType() !== GeometryType.CIRCLE;
|
|
78394
|
-
});
|
|
78395
|
-
}
|
|
78396
|
-
var snapped = false;
|
|
78397
|
-
var vertex = null;
|
|
78398
|
-
var vertexPixel = null;
|
|
78399
|
-
if (segments.length === 0) {
|
|
78400
|
-
return {
|
|
78401
|
-
snapped: snapped,
|
|
78402
|
-
vertex: vertex,
|
|
78403
|
-
vertexPixel: vertexPixel,
|
|
78404
|
-
};
|
|
78495
|
+
var segmentsLength = segments.length;
|
|
78496
|
+
if (segmentsLength === 0) {
|
|
78497
|
+
return null;
|
|
78405
78498
|
}
|
|
78406
78499
|
var projection = map.getView().getProjection();
|
|
78407
78500
|
var projectedCoordinate = fromUserCoordinate(pixelCoordinate);
|
|
78408
|
-
var
|
|
78501
|
+
var closestVertex;
|
|
78409
78502
|
var minSquaredDistance = Infinity;
|
|
78410
|
-
|
|
78411
|
-
|
|
78412
|
-
|
|
78413
|
-
|
|
78414
|
-
|
|
78415
|
-
|
|
78416
|
-
|
|
78417
|
-
|
|
78418
|
-
|
|
78419
|
-
|
|
78420
|
-
|
|
78421
|
-
|
|
78422
|
-
|
|
78423
|
-
var pixel2 = map.getPixelFromCoordinate(closestSegment[1]);
|
|
78424
|
-
var squaredDist1 = squaredDistance$1(pixel, pixel1);
|
|
78425
|
-
var squaredDist2 = squaredDistance$1(pixel, pixel2);
|
|
78426
|
-
var dist = Math.sqrt(Math.min(squaredDist1, squaredDist2));
|
|
78427
|
-
if (dist <= this.pixelTolerance_) {
|
|
78428
|
-
snapped = true;
|
|
78429
|
-
vertex =
|
|
78430
|
-
squaredDist1 > squaredDist2 ? closestSegment[1] : closestSegment[0];
|
|
78431
|
-
vertexPixel = map.getPixelFromCoordinate(vertex);
|
|
78432
|
-
}
|
|
78433
|
-
}
|
|
78434
|
-
else if (this.edge_) {
|
|
78435
|
-
var isCircle = closestSegmentData.feature.getGeometry().getType() ===
|
|
78436
|
-
GeometryType.CIRCLE;
|
|
78437
|
-
if (isCircle) {
|
|
78438
|
-
var circleGeometry = closestSegmentData.feature.getGeometry();
|
|
78439
|
-
var userProjection = getUserProjection();
|
|
78440
|
-
if (userProjection) {
|
|
78441
|
-
circleGeometry = circleGeometry
|
|
78442
|
-
.clone()
|
|
78443
|
-
.transform(userProjection, projection);
|
|
78503
|
+
var squaredPixelTolerance = this.pixelTolerance_ * this.pixelTolerance_;
|
|
78504
|
+
var getResult = function () {
|
|
78505
|
+
if (closestVertex) {
|
|
78506
|
+
var vertexPixel = map.getPixelFromCoordinate(closestVertex);
|
|
78507
|
+
var squaredPixelDistance = squaredDistance$1(pixel, vertexPixel);
|
|
78508
|
+
if (squaredPixelDistance <= squaredPixelTolerance) {
|
|
78509
|
+
return {
|
|
78510
|
+
vertex: closestVertex,
|
|
78511
|
+
vertexPixel: [
|
|
78512
|
+
Math.round(vertexPixel[0]),
|
|
78513
|
+
Math.round(vertexPixel[1]),
|
|
78514
|
+
],
|
|
78515
|
+
};
|
|
78444
78516
|
}
|
|
78445
|
-
vertex = toUserCoordinate(closestOnCircle(projectedCoordinate,
|
|
78446
|
-
/** @type {import("../geom/Circle.js").default} */ (circleGeometry)));
|
|
78447
78517
|
}
|
|
78448
|
-
|
|
78449
|
-
|
|
78450
|
-
|
|
78451
|
-
|
|
78452
|
-
|
|
78453
|
-
|
|
78454
|
-
|
|
78455
|
-
|
|
78456
|
-
|
|
78457
|
-
|
|
78458
|
-
|
|
78459
|
-
|
|
78460
|
-
|
|
78461
|
-
|
|
78462
|
-
if (dist <= this.pixelTolerance_) {
|
|
78463
|
-
vertex =
|
|
78464
|
-
squaredDist1 > squaredDist2
|
|
78465
|
-
? closestSegment[1]
|
|
78466
|
-
: closestSegment[0];
|
|
78467
|
-
vertexPixel = map.getPixelFromCoordinate(vertex);
|
|
78468
|
-
}
|
|
78518
|
+
return null;
|
|
78519
|
+
};
|
|
78520
|
+
if (this.vertex_) {
|
|
78521
|
+
for (var i = 0; i < segmentsLength; ++i) {
|
|
78522
|
+
var segmentData = segments[i];
|
|
78523
|
+
if (segmentData.feature.getGeometry().getType() !== GeometryType.CIRCLE) {
|
|
78524
|
+
segmentData.segment.forEach(function (vertex) {
|
|
78525
|
+
var tempVertexCoord = fromUserCoordinate(vertex);
|
|
78526
|
+
var delta = squaredDistance$1(projectedCoordinate, tempVertexCoord);
|
|
78527
|
+
if (delta < minSquaredDistance) {
|
|
78528
|
+
closestVertex = vertex;
|
|
78529
|
+
minSquaredDistance = delta;
|
|
78530
|
+
}
|
|
78531
|
+
});
|
|
78469
78532
|
}
|
|
78470
78533
|
}
|
|
78534
|
+
var result = getResult();
|
|
78535
|
+
if (result) {
|
|
78536
|
+
return result;
|
|
78537
|
+
}
|
|
78471
78538
|
}
|
|
78472
|
-
if (
|
|
78473
|
-
|
|
78539
|
+
if (this.edge_) {
|
|
78540
|
+
for (var i = 0; i < segmentsLength; ++i) {
|
|
78541
|
+
var vertex = null;
|
|
78542
|
+
var segmentData = segments[i];
|
|
78543
|
+
if (segmentData.feature.getGeometry().getType() === GeometryType.CIRCLE) {
|
|
78544
|
+
var circleGeometry = segmentData.feature.getGeometry();
|
|
78545
|
+
var userProjection = getUserProjection();
|
|
78546
|
+
if (userProjection) {
|
|
78547
|
+
circleGeometry = circleGeometry
|
|
78548
|
+
.clone()
|
|
78549
|
+
.transform(userProjection, projection);
|
|
78550
|
+
}
|
|
78551
|
+
vertex = toUserCoordinate(closestOnCircle(projectedCoordinate,
|
|
78552
|
+
/** @type {import("../geom/Circle.js").default} */ (circleGeometry)));
|
|
78553
|
+
}
|
|
78554
|
+
else {
|
|
78555
|
+
var _a = segmentData.segment, segmentStart = _a[0], segmentEnd = _a[1];
|
|
78556
|
+
// points have only one coordinate
|
|
78557
|
+
if (segmentEnd) {
|
|
78558
|
+
tempSegment$1[0] = fromUserCoordinate(segmentStart);
|
|
78559
|
+
tempSegment$1[1] = fromUserCoordinate(segmentEnd);
|
|
78560
|
+
vertex = closestOnSegment(projectedCoordinate, tempSegment$1);
|
|
78561
|
+
}
|
|
78562
|
+
}
|
|
78563
|
+
if (vertex) {
|
|
78564
|
+
var delta = squaredDistance$1(projectedCoordinate, vertex);
|
|
78565
|
+
if (delta < minSquaredDistance) {
|
|
78566
|
+
closestVertex = vertex;
|
|
78567
|
+
minSquaredDistance = delta;
|
|
78568
|
+
}
|
|
78569
|
+
}
|
|
78570
|
+
}
|
|
78571
|
+
var result = getResult();
|
|
78572
|
+
if (result) {
|
|
78573
|
+
return result;
|
|
78574
|
+
}
|
|
78474
78575
|
}
|
|
78475
|
-
return
|
|
78476
|
-
snapped: snapped,
|
|
78477
|
-
vertex: vertex,
|
|
78478
|
-
vertexPixel: vertexPixel,
|
|
78479
|
-
};
|
|
78576
|
+
return null;
|
|
78480
78577
|
};
|
|
78481
78578
|
/**
|
|
78482
78579
|
* @param {import("../Feature.js").default} feature Feature
|
|
@@ -78487,140 +78584,104 @@ var Snap = /** @class */ (function (_super) {
|
|
|
78487
78584
|
this.addFeature(feature, false);
|
|
78488
78585
|
};
|
|
78489
78586
|
/**
|
|
78490
|
-
* @param {import(
|
|
78587
|
+
* @param {Array<Array<import('../coordinate.js').Coordinate>>} segments Segments
|
|
78491
78588
|
* @param {import("../geom/Circle.js").default} geometry Geometry.
|
|
78492
78589
|
* @private
|
|
78493
78590
|
*/
|
|
78494
|
-
Snap.prototype.
|
|
78591
|
+
Snap.prototype.segmentCircleGemetry_ = function (segments, geometry) {
|
|
78495
78592
|
var projection = this.getMap().getView().getProjection();
|
|
78496
78593
|
var circleGeometry = geometry;
|
|
78497
78594
|
var polygon = fromCircle(circleGeometry);
|
|
78498
78595
|
var coordinates = polygon.getCoordinates()[0];
|
|
78499
78596
|
for (var i = 0, ii = coordinates.length - 1; i < ii; ++i) {
|
|
78500
|
-
|
|
78501
|
-
var segmentData = {
|
|
78502
|
-
feature: feature,
|
|
78503
|
-
segment: segment,
|
|
78504
|
-
};
|
|
78505
|
-
this.rBush_.insert(boundingExtent(segment), segmentData);
|
|
78597
|
+
segments.push(coordinates.slice(i, i + 2));
|
|
78506
78598
|
}
|
|
78507
78599
|
};
|
|
78508
78600
|
/**
|
|
78509
|
-
* @param {import(
|
|
78601
|
+
* @param {Array<Array<import('../coordinate.js').Coordinate>>} segments Segments
|
|
78510
78602
|
* @param {import("../geom/GeometryCollection.js").default} geometry Geometry.
|
|
78511
78603
|
* @private
|
|
78512
78604
|
*/
|
|
78513
|
-
Snap.prototype.
|
|
78605
|
+
Snap.prototype.segmentGeometryCollectionGemetry_ = function (segments, geometry) {
|
|
78514
78606
|
var geometries = geometry.getGeometriesArray();
|
|
78515
78607
|
for (var i = 0; i < geometries.length; ++i) {
|
|
78516
|
-
var
|
|
78517
|
-
if (
|
|
78518
|
-
|
|
78608
|
+
var segmenter = this.GEOMETRY_SEGMENTERS_[geometries[i].getType()];
|
|
78609
|
+
if (segmenter) {
|
|
78610
|
+
segmenter(segments, geometries[i]);
|
|
78519
78611
|
}
|
|
78520
78612
|
}
|
|
78521
78613
|
};
|
|
78522
78614
|
/**
|
|
78523
|
-
* @param {import(
|
|
78615
|
+
* @param {Array<Array<import('../coordinate.js').Coordinate>>} segments Segments
|
|
78524
78616
|
* @param {import("../geom/LineString.js").default} geometry Geometry.
|
|
78525
78617
|
* @private
|
|
78526
78618
|
*/
|
|
78527
|
-
Snap.prototype.
|
|
78619
|
+
Snap.prototype.segmentLineStringGemetry_ = function (segments, geometry) {
|
|
78528
78620
|
var coordinates = geometry.getCoordinates();
|
|
78529
78621
|
for (var i = 0, ii = coordinates.length - 1; i < ii; ++i) {
|
|
78530
|
-
|
|
78531
|
-
var segmentData = {
|
|
78532
|
-
feature: feature,
|
|
78533
|
-
segment: segment,
|
|
78534
|
-
};
|
|
78535
|
-
this.rBush_.insert(boundingExtent(segment), segmentData);
|
|
78622
|
+
segments.push(coordinates.slice(i, i + 2));
|
|
78536
78623
|
}
|
|
78537
78624
|
};
|
|
78538
78625
|
/**
|
|
78539
|
-
* @param {import(
|
|
78626
|
+
* @param {Array<Array<import('../coordinate.js').Coordinate>>} segments Segments
|
|
78540
78627
|
* @param {import("../geom/MultiLineString.js").default} geometry Geometry.
|
|
78541
78628
|
* @private
|
|
78542
78629
|
*/
|
|
78543
|
-
Snap.prototype.
|
|
78630
|
+
Snap.prototype.segmentMultiLineStringGemetry_ = function (segments, geometry) {
|
|
78544
78631
|
var lines = geometry.getCoordinates();
|
|
78545
78632
|
for (var j = 0, jj = lines.length; j < jj; ++j) {
|
|
78546
78633
|
var coordinates = lines[j];
|
|
78547
78634
|
for (var i = 0, ii = coordinates.length - 1; i < ii; ++i) {
|
|
78548
|
-
|
|
78549
|
-
var segmentData = {
|
|
78550
|
-
feature: feature,
|
|
78551
|
-
segment: segment,
|
|
78552
|
-
};
|
|
78553
|
-
this.rBush_.insert(boundingExtent(segment), segmentData);
|
|
78635
|
+
segments.push(coordinates.slice(i, i + 2));
|
|
78554
78636
|
}
|
|
78555
78637
|
}
|
|
78556
78638
|
};
|
|
78557
78639
|
/**
|
|
78558
|
-
* @param {import(
|
|
78640
|
+
* @param {Array<Array<import('../coordinate.js').Coordinate>>} segments Segments
|
|
78559
78641
|
* @param {import("../geom/MultiPoint.js").default} geometry Geometry.
|
|
78560
78642
|
* @private
|
|
78561
78643
|
*/
|
|
78562
|
-
Snap.prototype.
|
|
78563
|
-
|
|
78564
|
-
|
|
78565
|
-
|
|
78566
|
-
var segmentData = {
|
|
78567
|
-
feature: feature,
|
|
78568
|
-
segment: [coordinates, coordinates],
|
|
78569
|
-
};
|
|
78570
|
-
this.rBush_.insert(geometry.getExtent(), segmentData);
|
|
78571
|
-
}
|
|
78644
|
+
Snap.prototype.segmentMultiPointGemetry_ = function (segments, geometry) {
|
|
78645
|
+
geometry.getCoordinates().forEach(function (point) {
|
|
78646
|
+
segments.push([point]);
|
|
78647
|
+
});
|
|
78572
78648
|
};
|
|
78573
78649
|
/**
|
|
78574
|
-
* @param {import(
|
|
78650
|
+
* @param {Array<Array<import('../coordinate.js').Coordinate>>} segments Segments
|
|
78575
78651
|
* @param {import("../geom/MultiPolygon.js").default} geometry Geometry.
|
|
78576
78652
|
* @private
|
|
78577
78653
|
*/
|
|
78578
|
-
Snap.prototype.
|
|
78654
|
+
Snap.prototype.segmentMultiPolygonGemetry_ = function (segments, geometry) {
|
|
78579
78655
|
var polygons = geometry.getCoordinates();
|
|
78580
78656
|
for (var k = 0, kk = polygons.length; k < kk; ++k) {
|
|
78581
78657
|
var rings = polygons[k];
|
|
78582
78658
|
for (var j = 0, jj = rings.length; j < jj; ++j) {
|
|
78583
78659
|
var coordinates = rings[j];
|
|
78584
78660
|
for (var i = 0, ii = coordinates.length - 1; i < ii; ++i) {
|
|
78585
|
-
|
|
78586
|
-
var segmentData = {
|
|
78587
|
-
feature: feature,
|
|
78588
|
-
segment: segment,
|
|
78589
|
-
};
|
|
78590
|
-
this.rBush_.insert(boundingExtent(segment), segmentData);
|
|
78661
|
+
segments.push(coordinates.slice(i, i + 2));
|
|
78591
78662
|
}
|
|
78592
78663
|
}
|
|
78593
78664
|
}
|
|
78594
78665
|
};
|
|
78595
78666
|
/**
|
|
78596
|
-
* @param {import(
|
|
78667
|
+
* @param {Array<Array<import('../coordinate.js').Coordinate>>} segments Segments
|
|
78597
78668
|
* @param {import("../geom/Point.js").default} geometry Geometry.
|
|
78598
78669
|
* @private
|
|
78599
78670
|
*/
|
|
78600
|
-
Snap.prototype.
|
|
78601
|
-
|
|
78602
|
-
var segmentData = {
|
|
78603
|
-
feature: feature,
|
|
78604
|
-
segment: [coordinates, coordinates],
|
|
78605
|
-
};
|
|
78606
|
-
this.rBush_.insert(geometry.getExtent(), segmentData);
|
|
78671
|
+
Snap.prototype.segmentPointGemetry_ = function (segments, geometry) {
|
|
78672
|
+
segments.push([geometry.getCoordinates()]);
|
|
78607
78673
|
};
|
|
78608
78674
|
/**
|
|
78609
|
-
* @param {import(
|
|
78675
|
+
* @param {Array<Array<import('../coordinate.js').Coordinate>>} segments Segments
|
|
78610
78676
|
* @param {import("../geom/Polygon.js").default} geometry Geometry.
|
|
78611
78677
|
* @private
|
|
78612
78678
|
*/
|
|
78613
|
-
Snap.prototype.
|
|
78679
|
+
Snap.prototype.segmentPolygonGemetry_ = function (segments, geometry) {
|
|
78614
78680
|
var rings = geometry.getCoordinates();
|
|
78615
78681
|
for (var j = 0, jj = rings.length; j < jj; ++j) {
|
|
78616
78682
|
var coordinates = rings[j];
|
|
78617
78683
|
for (var i = 0, ii = coordinates.length - 1; i < ii; ++i) {
|
|
78618
|
-
|
|
78619
|
-
var segmentData = {
|
|
78620
|
-
feature: feature,
|
|
78621
|
-
segment: segment,
|
|
78622
|
-
};
|
|
78623
|
-
this.rBush_.insert(boundingExtent(segment), segmentData);
|
|
78684
|
+
segments.push(coordinates.slice(i, i + 2));
|
|
78624
78685
|
}
|
|
78625
78686
|
}
|
|
78626
78687
|
};
|
|
@@ -79295,7 +79356,10 @@ var createNode$1 = function createNode(options, map) {
|
|
|
79295
79356
|
styleFn: options.styleFn,
|
|
79296
79357
|
favorite: false,
|
|
79297
79358
|
userDefaultLayer: false,
|
|
79298
|
-
selectAllLayers: options.selectAllLayers
|
|
79359
|
+
selectAllLayers: options.selectAllLayers,
|
|
79360
|
+
hoverText: options.hoverText,
|
|
79361
|
+
layerDescription: options.layerDescription,
|
|
79362
|
+
attributions: options.attributions
|
|
79299
79363
|
};
|
|
79300
79364
|
return node;
|
|
79301
79365
|
};
|
|
@@ -79804,7 +79868,10 @@ var mapLayersBundle = {
|
|
|
79804
79868
|
function formatLabeledUrl(url) {
|
|
79805
79869
|
var delim = url.indexOf("?") === -1 ? "?" : "&";
|
|
79806
79870
|
return "".concat(url).concat(delim, "label=true");
|
|
79807
|
-
}
|
|
79871
|
+
} // if (node.HoverText){
|
|
79872
|
+
// set the text popup to the hover text value
|
|
79873
|
+
// }
|
|
79874
|
+
|
|
79808
79875
|
|
|
79809
79876
|
if (node.mapLayer) {
|
|
79810
79877
|
node.labelsOn = labelsOn;
|
|
@@ -106316,7 +106383,7 @@ var config = {
|
|
|
106316
106383
|
};
|
|
106317
106384
|
|
|
106318
106385
|
var name = "@corpsmap/corpsmap";
|
|
106319
|
-
var version$1 = "3.0.
|
|
106386
|
+
var version$1 = "3.0.15";
|
|
106320
106387
|
var description = "CorpsMap as React Components";
|
|
106321
106388
|
var main = "index.js";
|
|
106322
106389
|
var scripts = {
|
|
@@ -106374,6 +106441,8 @@ var dependencies = {
|
|
|
106374
106441
|
async: "^2.6.1",
|
|
106375
106442
|
classnames: "^2.2.5",
|
|
106376
106443
|
css: "^2.2.4",
|
|
106444
|
+
decompress: "^4.2.1",
|
|
106445
|
+
"extract-files": "^12.0.0",
|
|
106377
106446
|
"file-saver": "^2.0.2",
|
|
106378
106447
|
"is-html": "^2.0.0",
|
|
106379
106448
|
jspdf: "^1.5.3",
|
|
@@ -106384,6 +106453,7 @@ var dependencies = {
|
|
|
106384
106453
|
"money-clip": "^3.0.1",
|
|
106385
106454
|
ol: "^6.4.3",
|
|
106386
106455
|
"ol-esri-style": "^2.0.7",
|
|
106456
|
+
"parse2-kmz": "^1.0.5",
|
|
106387
106457
|
proj4: "^2.4.4",
|
|
106388
106458
|
"react-data-grid": "^6.1.0",
|
|
106389
106459
|
"react-datepicker": "^2.9.6",
|
|
@@ -107216,20 +107286,38 @@ var TreeListFolder = /*#__PURE__*/function (_React$Component) {
|
|
|
107216
107286
|
key: "render",
|
|
107217
107287
|
value: function render() {
|
|
107218
107288
|
var _this$props = this.props,
|
|
107289
|
+
displayName = _this$props.displayName,
|
|
107219
107290
|
item = _this$props.item,
|
|
107220
107291
|
collapsed = _this$props.collapsed,
|
|
107221
107292
|
toggleCollapsed = _this$props.toggleCollapsed;
|
|
107293
|
+
var testText = "LAYER_X";
|
|
107294
|
+
var hoverText = testText ;
|
|
107295
|
+
var _this$props2 = this.props,
|
|
107296
|
+
isOver = _this$props2.isOver,
|
|
107297
|
+
theme = _this$props2.theme,
|
|
107298
|
+
mapZoom = _this$props2.mapZoom;
|
|
107299
|
+
var enabled = item.minzoom <= mapZoom && item.maxzoom >= mapZoom;
|
|
107300
|
+
var itemTxtStyle = enabled ? {
|
|
107301
|
+
color: "#666"
|
|
107302
|
+
} : {
|
|
107303
|
+
color: "#bbb"
|
|
107304
|
+
};
|
|
107222
107305
|
var iconClass = classnames({
|
|
107223
|
-
|
|
107306
|
+
mdi: true,
|
|
107224
107307
|
"mdi-folder-open": !collapsed,
|
|
107225
107308
|
"mdi-folder": collapsed
|
|
107226
107309
|
});
|
|
107227
107310
|
var itemClass = classnames({
|
|
107228
107311
|
"tree-list-item-hover": false
|
|
107229
107312
|
});
|
|
107313
|
+
var itemClassTest = classnames({
|
|
107314
|
+
"cm-checkbox-inline": true,
|
|
107315
|
+
"cm-checkbox-ellipsis": true,
|
|
107316
|
+
"tree-list-item-hover": isOver
|
|
107317
|
+
});
|
|
107230
107318
|
var divStyle = {
|
|
107231
|
-
display:
|
|
107232
|
-
paddingLeft:
|
|
107319
|
+
display: "inline-block",
|
|
107320
|
+
paddingLeft: "8px"
|
|
107233
107321
|
};
|
|
107234
107322
|
var count = item.children.length;
|
|
107235
107323
|
return /*#__PURE__*/React$1__default.createElement("div", null, /*#__PURE__*/React$1__default.createElement("i", {
|
|
@@ -107237,14 +107325,18 @@ var TreeListFolder = /*#__PURE__*/function (_React$Component) {
|
|
|
107237
107325
|
onClick: toggleCollapsed,
|
|
107238
107326
|
className: iconClass,
|
|
107239
107327
|
style: {
|
|
107240
|
-
fontSize:
|
|
107241
|
-
cursor:
|
|
107328
|
+
fontSize: "16px",
|
|
107329
|
+
cursor: "pointer"
|
|
107242
107330
|
}
|
|
107243
107331
|
}), /*#__PURE__*/React$1__default.createElement("span", null, /*#__PURE__*/React$1__default.createElement("div", {
|
|
107244
107332
|
className: itemClass,
|
|
107245
107333
|
style: divStyle,
|
|
107246
107334
|
onDoubleClick: toggleCollapsed
|
|
107247
|
-
}, item.displayName), /*#__PURE__*/React$1__default.createElement("span", null,
|
|
107335
|
+
}, item.displayName), /*#__PURE__*/React$1__default.createElement("span", null, " (" + count + ")"), /*#__PURE__*/React$1__default.createElement("label", {
|
|
107336
|
+
className: itemClassTest,
|
|
107337
|
+
title: "".concat(hoverText, " ").concat(!enabled ? "- zoom in to enable" : ""),
|
|
107338
|
+
style: itemTxtStyle
|
|
107339
|
+
})));
|
|
107248
107340
|
}
|
|
107249
107341
|
}]);
|
|
107250
107342
|
|
|
@@ -132455,12 +132547,21 @@ var bundle = {
|
|
|
132455
132547
|
var u8arr = new Uint8Array(fileInfo);
|
|
132456
132548
|
var decodedFileInfo = utf8decoder.decode(u8arr);
|
|
132457
132549
|
console.log(decodedFileInfo); // read in our KML file and then parse it
|
|
132458
|
-
|
|
132459
|
-
|
|
132550
|
+
// const KMZ = new DOMParser().parseFromString(decodedFileInfo);
|
|
132551
|
+
// convert our kml to geojson and store the results
|
|
132460
132552
|
// const geojson = KMLConvert.kml(parsedKML);
|
|
132553
|
+
// const file1 = new File(["1"], "BuxtonNC.kmz", {
|
|
132554
|
+
// type: "text/plain",
|
|
132555
|
+
// });
|
|
132556
|
+
// const value = {
|
|
132557
|
+
// a: file1,
|
|
132558
|
+
// };
|
|
132559
|
+
// const { clone, files } = extractFiles(
|
|
132560
|
+
// value,
|
|
132561
|
+
// isExtractableFile,
|
|
132562
|
+
// "prefix"
|
|
132563
|
+
// );
|
|
132461
132564
|
// store.doAddDataGeojson(file.name, geojson);
|
|
132462
|
-
|
|
132463
|
-
console.log(parsedKMZ);
|
|
132464
132565
|
} catch (err) {
|
|
132465
132566
|
store.doDispatchNotification(err.message || "Error adding data");
|
|
132466
132567
|
}
|
|
@@ -132563,6 +132664,22 @@ var plugin = {
|
|
|
132563
132664
|
}]
|
|
132564
132665
|
};
|
|
132565
132666
|
|
|
132667
|
+
var formatArcgisrest = function formatArcgisrest(attributes) {
|
|
132668
|
+
for (var _i = 0, _Object$entries = Object.entries(attributes); _i < _Object$entries.length; _i++) {
|
|
132669
|
+
var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2),
|
|
132670
|
+
key = _Object$entries$_i[0],
|
|
132671
|
+
value = _Object$entries$_i[1];
|
|
132672
|
+
|
|
132673
|
+
var result = value.includes("https:") || value.includes("http:") ? value : null;
|
|
132674
|
+
|
|
132675
|
+
if (result) {
|
|
132676
|
+
attributes[key] = "<a href=\"".concat(value, "\" target=\"_new\" > ").concat(value, " </a>");
|
|
132677
|
+
}
|
|
132678
|
+
}
|
|
132679
|
+
|
|
132680
|
+
return attributes;
|
|
132681
|
+
};
|
|
132682
|
+
|
|
132566
132683
|
function formatUrl(options) {
|
|
132567
132684
|
var url = "".concat(options.root, "/identify?");
|
|
132568
132685
|
var params = [];
|
|
@@ -132675,7 +132792,7 @@ var bundle$1 = {
|
|
|
132675
132792
|
type: featureType,
|
|
132676
132793
|
coordinates: coords
|
|
132677
132794
|
},
|
|
132678
|
-
properties: feat.attributes
|
|
132795
|
+
properties: formatArcgisrest(feat.attributes)
|
|
132679
132796
|
};
|
|
132680
132797
|
})
|
|
132681
132798
|
})
|
|
@@ -157544,6 +157661,7 @@ var TreeListItemDataset = /*#__PURE__*/function (_React$Component) {
|
|
|
157544
157661
|
showLegend: false,
|
|
157545
157662
|
visible: props.item.visible,
|
|
157546
157663
|
displayName: props.item.displayName,
|
|
157664
|
+
hoverText: props.item.hoverText,
|
|
157547
157665
|
type: props.item.type,
|
|
157548
157666
|
expanded: false
|
|
157549
157667
|
};
|
|
@@ -157633,7 +157751,9 @@ var TreeListItemDataset = /*#__PURE__*/function (_React$Component) {
|
|
|
157633
157751
|
type = item.type,
|
|
157634
157752
|
identifyType = item.identifyType,
|
|
157635
157753
|
favorite = item.favorite,
|
|
157636
|
-
userDefaultLayer = item.userDefaultLayer
|
|
157754
|
+
userDefaultLayer = item.userDefaultLayer,
|
|
157755
|
+
hoverText = item.hoverText;
|
|
157756
|
+
var hoverTextDisplay = hoverText ? hoverText : displayName;
|
|
157637
157757
|
if (!item.passFilter) return null;
|
|
157638
157758
|
var enabled = item.minzoom <= mapZoom && item.maxzoom >= mapZoom;
|
|
157639
157759
|
var itemTxtStyle = enabled ? {
|
|
@@ -157667,7 +157787,7 @@ var TreeListItemDataset = /*#__PURE__*/function (_React$Component) {
|
|
|
157667
157787
|
title: "More Info"
|
|
157668
157788
|
}))), /*#__PURE__*/React$1__default.createElement("label", {
|
|
157669
157789
|
className: itemClass,
|
|
157670
|
-
title: "".concat(
|
|
157790
|
+
title: "".concat(hoverTextDisplay, " ").concat(!enabled ? "- zoom in to enable" : ""),
|
|
157671
157791
|
style: itemTxtStyle
|
|
157672
157792
|
}, /*#__PURE__*/React$1__default.createElement("input", {
|
|
157673
157793
|
disabled: !enabled,
|
|
@@ -158472,9 +158592,13 @@ var bundle$7 = {
|
|
|
158472
158592
|
type = lyr.type,
|
|
158473
158593
|
layerList = lyr.layerList,
|
|
158474
158594
|
uid = lyr.uid,
|
|
158475
|
-
displayName = lyr.displayName
|
|
158595
|
+
displayName = lyr.displayName,
|
|
158596
|
+
layerDescription = lyr.layerDescription,
|
|
158597
|
+
attributions = lyr.attributions;
|
|
158476
158598
|
legendCanvases[uid] = {
|
|
158477
158599
|
displayName: displayName,
|
|
158600
|
+
layerDescription: layerDescription,
|
|
158601
|
+
attributions: attributions,
|
|
158478
158602
|
canvas: [],
|
|
158479
158603
|
widths: [],
|
|
158480
158604
|
heights: []
|
|
@@ -158540,12 +158664,16 @@ var bundle$7 = {
|
|
|
158540
158664
|
store = _ref3.store;
|
|
158541
158665
|
var uid = lyr.uid,
|
|
158542
158666
|
layerList = lyr.layerList,
|
|
158543
|
-
displayName = lyr.displayName
|
|
158667
|
+
displayName = lyr.displayName,
|
|
158668
|
+
layerDescription = lyr.layerDescription,
|
|
158669
|
+
attributions = lyr.attributions;
|
|
158544
158670
|
var legendLayers = store.selectLegendLayers();
|
|
158545
158671
|
var legendCanvases = store.selectLegendCanvases();
|
|
158546
158672
|
var activeLayers = layerList.replace(/show:/g, "").split(",").map(Number);
|
|
158547
158673
|
legendCanvases[uid] = {
|
|
158548
158674
|
displayName: displayName,
|
|
158675
|
+
layerDescription: layerDescription,
|
|
158676
|
+
attributions: attributions,
|
|
158549
158677
|
canvas: [],
|
|
158550
158678
|
widths: [],
|
|
158551
158679
|
heights: []
|
|
@@ -158606,12 +158734,16 @@ var bundle$7 = {
|
|
|
158606
158734
|
var dispatch = _ref4.dispatch,
|
|
158607
158735
|
store = _ref4.store;
|
|
158608
158736
|
var uid = lyr.uid,
|
|
158609
|
-
displayName = lyr.displayName
|
|
158737
|
+
displayName = lyr.displayName,
|
|
158738
|
+
layerDescription = lyr.layerDescription,
|
|
158739
|
+
attributions = lyr.attributions;
|
|
158610
158740
|
var legendLayers = store.selectLegendLayers();
|
|
158611
158741
|
var legendCanvases = store.selectLegendCanvases();
|
|
158612
158742
|
var drawingInfo = data.drawingInfo;
|
|
158613
158743
|
legendCanvases[uid] = {
|
|
158614
158744
|
displayName: displayName,
|
|
158745
|
+
layerDescription: layerDescription,
|
|
158746
|
+
attributions: attributions,
|
|
158615
158747
|
canvas: [],
|
|
158616
158748
|
widths: [],
|
|
158617
158749
|
heights: []
|
|
@@ -160213,7 +160345,26 @@ var bundle$a = {
|
|
|
160213
160345
|
legendCanvases[layer.uid].canvas.forEach(function (item) {
|
|
160214
160346
|
layerCTX.drawImage(item, 0, dy);
|
|
160215
160347
|
dy += Number(item.height);
|
|
160216
|
-
});
|
|
160348
|
+
}); //add layerDescription
|
|
160349
|
+
// if(legendCanvases[layer.uid].layerDescription) {
|
|
160350
|
+
// dy += 50;
|
|
160351
|
+
// layerCTX.font = "bold 12px Arial";
|
|
160352
|
+
// layerCTX.fillStyle = "black";
|
|
160353
|
+
// layerCTX.fillText("Layer Description: ", 0, dy);
|
|
160354
|
+
// dy += 20;
|
|
160355
|
+
// layerCTX.fillText(legendCanvases[layer.uid].layerDescription, 0, dy);
|
|
160356
|
+
// }
|
|
160357
|
+
//add attribution
|
|
160358
|
+
|
|
160359
|
+
if (legendCanvases[layer.uid].attributions) {
|
|
160360
|
+
dy += 50;
|
|
160361
|
+
layerCTX.font = "bold 12px Arial";
|
|
160362
|
+
layerCTX.fillStyle = "black";
|
|
160363
|
+
layerCTX.fillText("Credits: ", 0, dy);
|
|
160364
|
+
dy += 20;
|
|
160365
|
+
layerCTX.fillText(legendCanvases[layer.uid].attributions, 0, dy);
|
|
160366
|
+
}
|
|
160367
|
+
|
|
160217
160368
|
canvases.push(layerCanvas);
|
|
160218
160369
|
} else {
|
|
160219
160370
|
//set canvas dimensions
|
|
@@ -160920,7 +161071,7 @@ var LayerSubpanel = function LayerSubpanel(props) {
|
|
|
160920
161071
|
});
|
|
160921
161072
|
var listTop = primaryPanelShowClose ? 70 : 30;
|
|
160922
161073
|
var showDownload = treeViewDownloadEnabled && treeViewSelectedItem.identifyType === "MAP" ? true : false;
|
|
160923
|
-
var url = treeViewSelectedItem.identifyType == "MAP" ? "".concat(treeViewSelectedItem.url, "
|
|
161074
|
+
var url = treeViewSelectedItem.identifyType == "MAP" ? "".concat(treeViewSelectedItem.url, "?&service=WMS&version=1.3.0&request=GetCapabilities&layers=").concat(treeViewSelectedItem.layerList, "&query_layers=").concat(treeViewSelectedItem.layerList) : treeViewSelectedItem.url;
|
|
160924
161075
|
return /*#__PURE__*/React$1__default.createElement("div", null, /*#__PURE__*/React$1__default.createElement("div", null, /*#__PURE__*/React$1__default.createElement("span", {
|
|
160925
161076
|
onClick: doRenderTreeView,
|
|
160926
161077
|
title: "Go back",
|
|
@@ -160946,7 +161097,7 @@ var LayerSubpanel = function LayerSubpanel(props) {
|
|
|
160946
161097
|
title: "Source for ".concat(treeViewSelectedItem.displayName),
|
|
160947
161098
|
href: url,
|
|
160948
161099
|
target: "_blank"
|
|
160949
|
-
}, "Source", " ")), /*#__PURE__*/React$1__default.createElement("p", null, /*#__PURE__*/React$1__default.createElement("b", null, "Layer(s):"), " ", treeViewSelectedItem.layerList, " "), /*#__PURE__*/React$1__default.createElement("p", null, /*#__PURE__*/React$1__default.createElement("b", null, "Service Type:"), " ", treeViewSelectedItem.type, " "), /*#__PURE__*/React$1__default.createElement("p", null, /*#__PURE__*/React$1__default.createElement("b", null, "Identify Type:"), " ", treeViewSelectedItem.identifyType, " "), /*#__PURE__*/React$1__default.createElement("p", null, /*#__PURE__*/React$1__default.createElement("b", null, "Min Zoom:"), " ", treeViewSelectedItem.minzoom, " "), /*#__PURE__*/React$1__default.createElement("p", null, /*#__PURE__*/React$1__default.createElement("b", null, "Max Zoom:"), " ", treeViewSelectedItem.maxzoom, " "), /*#__PURE__*/React$1__default.createElement("p", null, /*#__PURE__*/React$1__default.createElement("b", null, "Current Zoom:"), " ", Math.floor(mapZoom), " "), primaryPanelShowFavoritesBtn ? /*#__PURE__*/React$1__default.createElement(FavoritesToggle$1, {
|
|
161100
|
+
}, "Source", " ")), /*#__PURE__*/React$1__default.createElement("p", null, /*#__PURE__*/React$1__default.createElement("b", null, "Layer(s):"), " ", treeViewSelectedItem.layerList, " "), /*#__PURE__*/React$1__default.createElement("p", null, /*#__PURE__*/React$1__default.createElement("b", null, "Service Type:"), " ", treeViewSelectedItem.type, " "), /*#__PURE__*/React$1__default.createElement("p", null, /*#__PURE__*/React$1__default.createElement("b", null, "Identify Type:"), " ", treeViewSelectedItem.identifyType, " "), /*#__PURE__*/React$1__default.createElement("p", null, /*#__PURE__*/React$1__default.createElement("b", null, "Min Zoom:"), " ", treeViewSelectedItem.minzoom, " "), /*#__PURE__*/React$1__default.createElement("p", null, /*#__PURE__*/React$1__default.createElement("b", null, "Max Zoom:"), " ", treeViewSelectedItem.maxzoom, " "), /*#__PURE__*/React$1__default.createElement("p", null, /*#__PURE__*/React$1__default.createElement("b", null, "Current Zoom:"), " ", Math.floor(mapZoom), " "), /*#__PURE__*/React$1__default.createElement("p", null, /*#__PURE__*/React$1__default.createElement("b", null, "Credits:"), " ", treeViewSelectedItem.attributions, " "), /*#__PURE__*/React$1__default.createElement("p", null, /*#__PURE__*/React$1__default.createElement("b", null, "Layer Description:"), " ", treeViewSelectedItem.layerDescription, " "), primaryPanelShowFavoritesBtn ? /*#__PURE__*/React$1__default.createElement(FavoritesToggle$1, {
|
|
160950
161101
|
layer: treeViewSelectedItem
|
|
160951
161102
|
}) : null, /*#__PURE__*/React$1__default.createElement("p", null), primaryPanelShowUserDefaultLayersBtn ? /*#__PURE__*/React$1__default.createElement(DefaultsToggle$1, {
|
|
160952
161103
|
layer: treeViewSelectedItem
|
|
@@ -161547,7 +161698,7 @@ var treeViewDownload = {
|
|
|
161547
161698
|
var url = null;
|
|
161548
161699
|
|
|
161549
161700
|
if (layer.identifyType === "MAP") {
|
|
161550
|
-
var params = "
|
|
161701
|
+
var params = "?&service=WFS&version=1.1.0&request=GetFeature&typeName=".concat(layer.layerList, "&outputformat=").concat(format, "&outfile=").concat(layer.layerList);
|
|
161551
161702
|
url = "".concat(layer.url).concat(params);
|
|
161552
161703
|
}
|
|
161553
161704
|
|
|
@@ -161622,7 +161773,7 @@ var treeViewDownload = {
|
|
|
161622
161773
|
|
|
161623
161774
|
switch (layer.identifyType) {
|
|
161624
161775
|
case "MAP":
|
|
161625
|
-
var params = "
|
|
161776
|
+
var params = "?&service=WFS&version=1.1.0&request=GetFeature&typeName=".concat(layer.layerList, "&outputformat=").concat(format, "&outfile=").concat(layer.layerList);
|
|
161626
161777
|
url = "".concat(layer.url).concat(params);
|
|
161627
161778
|
break;
|
|
161628
161779
|
}
|