@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/dev.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
|
};
|
|
@@ -5356,6 +5398,9 @@ function createObjectIterator(obj) {
|
|
|
5356
5398
|
var len = okeys.length;
|
|
5357
5399
|
return function next() {
|
|
5358
5400
|
var key = okeys[++i];
|
|
5401
|
+
if (key === '__proto__') {
|
|
5402
|
+
return next();
|
|
5403
|
+
}
|
|
5359
5404
|
return i < len ? { value: obj[key], key: key } : null;
|
|
5360
5405
|
};
|
|
5361
5406
|
}
|
|
@@ -28773,7 +28818,7 @@ function getUid(obj) {
|
|
|
28773
28818
|
* OpenLayers version.
|
|
28774
28819
|
* @type {string}
|
|
28775
28820
|
*/
|
|
28776
|
-
var VERSION = '6.
|
|
28821
|
+
var VERSION = '6.14.1';
|
|
28777
28822
|
|
|
28778
28823
|
var __extends = (undefined && undefined.__extends) || (function () {
|
|
28779
28824
|
var extendStatics = function (d, b) {
|
|
@@ -31146,6 +31191,13 @@ var FIREFOX = ua.indexOf('firefox') !== -1;
|
|
|
31146
31191
|
* @type {boolean}
|
|
31147
31192
|
*/
|
|
31148
31193
|
var SAFARI = ua.indexOf('safari') !== -1 && ua.indexOf('chrom') == -1;
|
|
31194
|
+
/**
|
|
31195
|
+
* https://bugs.webkit.org/show_bug.cgi?id=237906
|
|
31196
|
+
* @type {boolean}
|
|
31197
|
+
*/
|
|
31198
|
+
var SAFARI_BUG_237906 = SAFARI &&
|
|
31199
|
+
!!(ua.indexOf('version/15.4') >= 0 ||
|
|
31200
|
+
ua.match(/cpu (os|iphone os) 15_4 like mac os x/));
|
|
31149
31201
|
/**
|
|
31150
31202
|
* User agent string says we are dealing with a WebKit engine.
|
|
31151
31203
|
* @type {boolean}
|
|
@@ -36099,7 +36151,7 @@ function fromUserCoordinate(coordinate, destProjection) {
|
|
|
36099
36151
|
coordinate[1] <= 90) {
|
|
36100
36152
|
showCoordinateWarning = false;
|
|
36101
36153
|
// eslint-disable-next-line no-console
|
|
36102
|
-
console.warn('Call useGeographic() ol/proj once to work with [longitude, latitude] coordinates.');
|
|
36154
|
+
console.warn('Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.');
|
|
36103
36155
|
}
|
|
36104
36156
|
return coordinate;
|
|
36105
36157
|
}
|
|
@@ -44101,7 +44153,6 @@ var __extends$s = (undefined && undefined.__extends) || (function () {
|
|
|
44101
44153
|
* @typedef {Object} State
|
|
44102
44154
|
* @property {import("./Layer.js").default} layer Layer.
|
|
44103
44155
|
* @property {number} opacity Opacity, the value is rounded to two digits to appear after the decimal point.
|
|
44104
|
-
* @property {import("../source/Source.js").default|undefined} source Source being rendered (only for multi-source layers).
|
|
44105
44156
|
* @property {boolean} visible Visible.
|
|
44106
44157
|
* @property {boolean} managed Managed.
|
|
44107
44158
|
* @property {import("../extent.js").Extent} [extent] Extent.
|
|
@@ -44371,7 +44422,7 @@ var Layer = /** @class */ (function (_super) {
|
|
|
44371
44422
|
};
|
|
44372
44423
|
/**
|
|
44373
44424
|
* Get the renderer for this layer.
|
|
44374
|
-
* @return {RendererType} The layer renderer.
|
|
44425
|
+
* @return {RendererType|null} The layer renderer.
|
|
44375
44426
|
*/
|
|
44376
44427
|
Layer.prototype.getRenderer = function () {
|
|
44377
44428
|
if (!this.renderer_) {
|
|
@@ -46059,11 +46110,13 @@ var CanvasImageLayerRenderer = /** @class */ (function (_super) {
|
|
|
46059
46110
|
if (imageSource) {
|
|
46060
46111
|
var projection = viewState.projection;
|
|
46061
46112
|
var image = imageSource.getImage(renderedExtent, viewResolution, pixelRatio, projection);
|
|
46062
|
-
if (image
|
|
46063
|
-
this.
|
|
46064
|
-
|
|
46065
|
-
|
|
46066
|
-
|
|
46113
|
+
if (image) {
|
|
46114
|
+
if (this.loadImage(image)) {
|
|
46115
|
+
this.image_ = image;
|
|
46116
|
+
}
|
|
46117
|
+
else if (image.getState() === ImageState.EMPTY) {
|
|
46118
|
+
this.image_ = null;
|
|
46119
|
+
}
|
|
46067
46120
|
}
|
|
46068
46121
|
}
|
|
46069
46122
|
else {
|
|
@@ -53135,7 +53188,7 @@ var Text = /** @class */ (function () {
|
|
|
53135
53188
|
/**
|
|
53136
53189
|
* Set the text.
|
|
53137
53190
|
*
|
|
53138
|
-
* @param {string|undefined} text Text.
|
|
53191
|
+
* @param {string|Array<string>|undefined} text Text.
|
|
53139
53192
|
* @api
|
|
53140
53193
|
*/
|
|
53141
53194
|
Text.prototype.setText = function (text) {
|
|
@@ -60040,6 +60093,9 @@ function createObjectIterator(obj) {
|
|
|
60040
60093
|
var len = okeys.length;
|
|
60041
60094
|
return function next() {
|
|
60042
60095
|
var key = okeys[++i];
|
|
60096
|
+
if (key === '__proto__') {
|
|
60097
|
+
return next();
|
|
60098
|
+
}
|
|
60043
60099
|
return i < len ? {value: obj[key], key: key} : null;
|
|
60044
60100
|
};
|
|
60045
60101
|
}
|
|
@@ -66779,9 +66835,21 @@ var MapEventType = {
|
|
|
66779
66835
|
* @api
|
|
66780
66836
|
*/
|
|
66781
66837
|
MOVEEND: 'moveend',
|
|
66838
|
+
/**
|
|
66839
|
+
* Triggered when loading of additional map data (tiles, images, features) starts.
|
|
66840
|
+
* @event module:ol/render/Event~RenderEvent#loadstart
|
|
66841
|
+
* @api
|
|
66842
|
+
*/
|
|
66843
|
+
LOADSTART: 'loadstart',
|
|
66844
|
+
/**
|
|
66845
|
+
* Triggered when loading of additional map data has completed.
|
|
66846
|
+
* @event module:ol/render/Event~RenderEvent#loadend
|
|
66847
|
+
* @api
|
|
66848
|
+
*/
|
|
66849
|
+
LOADEND: 'loadend',
|
|
66782
66850
|
};
|
|
66783
66851
|
/***
|
|
66784
|
-
* @typedef {'postrender'|'movestart'|'moveend'} Types
|
|
66852
|
+
* @typedef {'postrender'|'movestart'|'moveend'|'loadstart'|'loadend'} Types
|
|
66785
66853
|
*/
|
|
66786
66854
|
|
|
66787
66855
|
/**
|
|
@@ -67865,15 +67933,15 @@ var View = /** @class */ (function (_super) {
|
|
|
67865
67933
|
* @type {import("./coordinate.js").Coordinate|undefined}
|
|
67866
67934
|
*/
|
|
67867
67935
|
_this.cancelAnchor_ = undefined;
|
|
67936
|
+
if (options.projection) {
|
|
67937
|
+
disableCoordinateWarning();
|
|
67938
|
+
}
|
|
67868
67939
|
if (options.center) {
|
|
67869
67940
|
options.center = fromUserCoordinate(options.center, _this.projection_);
|
|
67870
67941
|
}
|
|
67871
67942
|
if (options.extent) {
|
|
67872
67943
|
options.extent = fromUserExtent(options.extent, _this.projection_);
|
|
67873
67944
|
}
|
|
67874
|
-
if (options.projection) {
|
|
67875
|
-
disableCoordinateWarning();
|
|
67876
|
-
}
|
|
67877
67945
|
_this.applyOptions_(options);
|
|
67878
67946
|
return _this;
|
|
67879
67947
|
}
|
|
@@ -69492,9 +69560,14 @@ var PluggableMap = /** @class */ (function (_super) {
|
|
|
69492
69560
|
var optionsInternal = createOptionsInternal(options);
|
|
69493
69561
|
/**
|
|
69494
69562
|
* @private
|
|
69495
|
-
* @type {boolean}
|
|
69563
|
+
* @type {boolean|undefined}
|
|
69496
69564
|
*/
|
|
69497
69565
|
_this.renderComplete_;
|
|
69566
|
+
/**
|
|
69567
|
+
* @private
|
|
69568
|
+
* @type {boolean}
|
|
69569
|
+
*/
|
|
69570
|
+
_this.loaded_ = true;
|
|
69498
69571
|
/** @private */
|
|
69499
69572
|
_this.boundHandleBrowserEvent_ = _this.handleBrowserEvent.bind(_this);
|
|
69500
69573
|
/**
|
|
@@ -69646,7 +69719,7 @@ var PluggableMap = /** @class */ (function (_super) {
|
|
|
69646
69719
|
*/
|
|
69647
69720
|
_this.overlayIdIndex_ = {};
|
|
69648
69721
|
/**
|
|
69649
|
-
* @type {import("./renderer/Map.js").default}
|
|
69722
|
+
* @type {import("./renderer/Map.js").default|null}
|
|
69650
69723
|
* @private
|
|
69651
69724
|
*/
|
|
69652
69725
|
_this.renderer_ = null;
|
|
@@ -69832,7 +69905,7 @@ var PluggableMap = /** @class */ (function (_super) {
|
|
|
69832
69905
|
* @api
|
|
69833
69906
|
*/
|
|
69834
69907
|
PluggableMap.prototype.forEachFeatureAtPixel = function (pixel, callback, opt_options) {
|
|
69835
|
-
if (!this.frameState_) {
|
|
69908
|
+
if (!this.frameState_ || !this.renderer_) {
|
|
69836
69909
|
return;
|
|
69837
69910
|
}
|
|
69838
69911
|
var coordinate = this.getCoordinateFromPixelInternal(pixel);
|
|
@@ -69906,7 +69979,7 @@ var PluggableMap = /** @class */ (function (_super) {
|
|
|
69906
69979
|
* @deprecated
|
|
69907
69980
|
*/
|
|
69908
69981
|
PluggableMap.prototype.forEachLayerAtPixel = function (pixel, callback, opt_options) {
|
|
69909
|
-
if (!this.frameState_) {
|
|
69982
|
+
if (!this.frameState_ || !this.renderer_) {
|
|
69910
69983
|
return;
|
|
69911
69984
|
}
|
|
69912
69985
|
var options = opt_options || {};
|
|
@@ -69923,7 +69996,7 @@ var PluggableMap = /** @class */ (function (_super) {
|
|
|
69923
69996
|
* @api
|
|
69924
69997
|
*/
|
|
69925
69998
|
PluggableMap.prototype.hasFeatureAtPixel = function (pixel, opt_options) {
|
|
69926
|
-
if (!this.frameState_) {
|
|
69999
|
+
if (!this.frameState_ || !this.renderer_) {
|
|
69927
70000
|
return false;
|
|
69928
70001
|
}
|
|
69929
70002
|
var coordinate = this.getCoordinateFromPixelInternal(pixel);
|
|
@@ -70103,11 +70176,15 @@ var PluggableMap = /** @class */ (function (_super) {
|
|
|
70103
70176
|
PluggableMap.prototype.getLoadingOrNotReady = function () {
|
|
70104
70177
|
var layerStatesArray = this.getLayerGroup().getLayerStatesArray();
|
|
70105
70178
|
for (var i = 0, ii = layerStatesArray.length; i < ii; ++i) {
|
|
70106
|
-
var
|
|
70107
|
-
if (!
|
|
70179
|
+
var state = layerStatesArray[i];
|
|
70180
|
+
if (!state.visible) {
|
|
70181
|
+
continue;
|
|
70182
|
+
}
|
|
70183
|
+
var renderer = state.layer.getRenderer();
|
|
70184
|
+
if (renderer && !renderer.ready) {
|
|
70108
70185
|
return true;
|
|
70109
70186
|
}
|
|
70110
|
-
var source = /** @type {import("./layer/Layer.js").default} */ (layer).getSource();
|
|
70187
|
+
var source = /** @type {import("./layer/Layer.js").default} */ (state.layer).getSource();
|
|
70111
70188
|
if (source && source.loading) {
|
|
70112
70189
|
return true;
|
|
70113
70190
|
}
|
|
@@ -70142,7 +70219,7 @@ var PluggableMap = /** @class */ (function (_super) {
|
|
|
70142
70219
|
};
|
|
70143
70220
|
/**
|
|
70144
70221
|
* Get the map renderer.
|
|
70145
|
-
* @return {import("./renderer/Map.js").default} Renderer
|
|
70222
|
+
* @return {import("./renderer/Map.js").default|null} Renderer
|
|
70146
70223
|
*/
|
|
70147
70224
|
PluggableMap.prototype.getRenderer = function () {
|
|
70148
70225
|
return this.renderer_;
|
|
@@ -70299,11 +70376,20 @@ var PluggableMap = /** @class */ (function (_super) {
|
|
|
70299
70376
|
tileQueue.loadMoreTiles(maxTotalLoading, maxNewLoads);
|
|
70300
70377
|
}
|
|
70301
70378
|
}
|
|
70302
|
-
if (frameState &&
|
|
70303
|
-
this.
|
|
70304
|
-
|
|
70305
|
-
|
|
70306
|
-
|
|
70379
|
+
if (frameState && this.renderer_ && !frameState.animate) {
|
|
70380
|
+
if (this.renderComplete_ === true) {
|
|
70381
|
+
if (this.hasListener(RenderEventType.RENDERCOMPLETE)) {
|
|
70382
|
+
this.renderer_.dispatchRenderEvent(RenderEventType.RENDERCOMPLETE, frameState);
|
|
70383
|
+
}
|
|
70384
|
+
if (this.loaded_ === false) {
|
|
70385
|
+
this.loaded_ = true;
|
|
70386
|
+
this.dispatchEvent(new MapEvent(MapEventType.LOADEND, this, frameState));
|
|
70387
|
+
}
|
|
70388
|
+
}
|
|
70389
|
+
else if (this.loaded_ === true) {
|
|
70390
|
+
this.loaded_ = false;
|
|
70391
|
+
this.dispatchEvent(new MapEvent(MapEventType.LOADSTART, this, frameState));
|
|
70392
|
+
}
|
|
70307
70393
|
}
|
|
70308
70394
|
var postRenderFunctions = this.postRenderFunctions_;
|
|
70309
70395
|
for (var i = 0, ii = postRenderFunctions.length; i < ii; ++i) {
|
|
@@ -70559,7 +70645,7 @@ var PluggableMap = /** @class */ (function (_super) {
|
|
|
70559
70645
|
}
|
|
70560
70646
|
}
|
|
70561
70647
|
this.frameState_ = frameState;
|
|
70562
|
-
this.renderer_.renderFrame(frameState);
|
|
70648
|
+
/** @type {import("./renderer/Map.js").default} */ (this.renderer_).renderFrame(frameState);
|
|
70563
70649
|
if (frameState) {
|
|
70564
70650
|
if (frameState.animate) {
|
|
70565
70651
|
this.render();
|
|
@@ -70585,9 +70671,13 @@ var PluggableMap = /** @class */ (function (_super) {
|
|
|
70585
70671
|
}
|
|
70586
70672
|
this.dispatchEvent(new MapEvent(MapEventType.POSTRENDER, this, frameState));
|
|
70587
70673
|
this.renderComplete_ =
|
|
70588
|
-
|
|
70589
|
-
|
|
70590
|
-
|
|
70674
|
+
this.hasListener(MapEventType.LOADSTART) ||
|
|
70675
|
+
this.hasListener(MapEventType.LOADEND) ||
|
|
70676
|
+
this.hasListener(RenderEventType.RENDERCOMPLETE)
|
|
70677
|
+
? !this.tileQueue_.getTilesLoading() &&
|
|
70678
|
+
!this.tileQueue_.getCount() &&
|
|
70679
|
+
!this.getLoadingOrNotReady()
|
|
70680
|
+
: undefined;
|
|
70591
70681
|
if (!this.postRenderTimeoutHandle_) {
|
|
70592
70682
|
this.postRenderTimeoutHandle_ = setTimeout(function () {
|
|
70593
70683
|
_this.postRenderTimeoutHandle_ = undefined;
|
|
@@ -78146,7 +78236,6 @@ var __extends$1v = (undefined && undefined.__extends) || (function () {
|
|
|
78146
78236
|
})();
|
|
78147
78237
|
/**
|
|
78148
78238
|
* @typedef {Object} Result
|
|
78149
|
-
* @property {boolean} snapped Snapped.
|
|
78150
78239
|
* @property {import("../coordinate.js").Coordinate|null} vertex Vertex.
|
|
78151
78240
|
* @property {import("../pixel.js").Pixel|null} vertexPixel VertexPixel.
|
|
78152
78241
|
*/
|
|
@@ -78280,18 +78369,18 @@ var Snap = /** @class */ (function (_super) {
|
|
|
78280
78369
|
/**
|
|
78281
78370
|
* @const
|
|
78282
78371
|
* @private
|
|
78283
|
-
* @type {Object<string, function(import(
|
|
78284
|
-
*/
|
|
78285
|
-
_this.
|
|
78286
|
-
'Point': _this.
|
|
78287
|
-
'LineString': _this.
|
|
78288
|
-
'LinearRing': _this.
|
|
78289
|
-
'Polygon': _this.
|
|
78290
|
-
'MultiPoint': _this.
|
|
78291
|
-
'MultiLineString': _this.
|
|
78292
|
-
'MultiPolygon': _this.
|
|
78293
|
-
'GeometryCollection': _this.
|
|
78294
|
-
'Circle': _this.
|
|
78372
|
+
* @type {Object<string, function(Array<Array<import('../coordinate.js').Coordinate>>, import("../geom/Geometry.js").default): void>}
|
|
78373
|
+
*/
|
|
78374
|
+
_this.GEOMETRY_SEGMENTERS_ = {
|
|
78375
|
+
'Point': _this.segmentPointGemetry_.bind(_this),
|
|
78376
|
+
'LineString': _this.segmentLineStringGemetry_.bind(_this),
|
|
78377
|
+
'LinearRing': _this.segmentLineStringGemetry_.bind(_this),
|
|
78378
|
+
'Polygon': _this.segmentPolygonGemetry_.bind(_this),
|
|
78379
|
+
'MultiPoint': _this.segmentMultiPointGemetry_.bind(_this),
|
|
78380
|
+
'MultiLineString': _this.segmentMultiLineStringGemetry_.bind(_this),
|
|
78381
|
+
'MultiPolygon': _this.segmentMultiPolygonGemetry_.bind(_this),
|
|
78382
|
+
'GeometryCollection': _this.segmentGeometryCollectionGemetry_.bind(_this),
|
|
78383
|
+
'Circle': _this.segmentCircleGemetry_.bind(_this),
|
|
78295
78384
|
};
|
|
78296
78385
|
return _this;
|
|
78297
78386
|
}
|
|
@@ -78307,10 +78396,26 @@ var Snap = /** @class */ (function (_super) {
|
|
|
78307
78396
|
var feature_uid = getUid(feature);
|
|
78308
78397
|
var geometry = feature.getGeometry();
|
|
78309
78398
|
if (geometry) {
|
|
78310
|
-
var
|
|
78311
|
-
if (
|
|
78399
|
+
var segmenter = this.GEOMETRY_SEGMENTERS_[geometry.getType()];
|
|
78400
|
+
if (segmenter) {
|
|
78312
78401
|
this.indexedFeaturesExtents_[feature_uid] = geometry.getExtent(createEmpty());
|
|
78313
|
-
|
|
78402
|
+
var segments =
|
|
78403
|
+
/** @type {Array<Array<import('../coordinate.js').Coordinate>>} */ ([]);
|
|
78404
|
+
segmenter(segments, geometry);
|
|
78405
|
+
if (segments.length === 1) {
|
|
78406
|
+
this.rBush_.insert(boundingExtent(segments[0]), {
|
|
78407
|
+
feature: feature,
|
|
78408
|
+
segment: segments[0],
|
|
78409
|
+
});
|
|
78410
|
+
}
|
|
78411
|
+
else if (segments.length > 1) {
|
|
78412
|
+
var extents = segments.map(function (s) { return boundingExtent(s); });
|
|
78413
|
+
var segmentsData = segments.map(function (segment) { return ({
|
|
78414
|
+
feature: feature,
|
|
78415
|
+
segment: segment,
|
|
78416
|
+
}); });
|
|
78417
|
+
this.rBush_.load(extents, segmentsData);
|
|
78418
|
+
}
|
|
78314
78419
|
}
|
|
78315
78420
|
}
|
|
78316
78421
|
if (register) {
|
|
@@ -78351,7 +78456,7 @@ var Snap = /** @class */ (function (_super) {
|
|
|
78351
78456
|
*/
|
|
78352
78457
|
Snap.prototype.handleEvent = function (evt) {
|
|
78353
78458
|
var result = this.snapTo(evt.pixel, evt.coordinate, evt.map);
|
|
78354
|
-
if (result
|
|
78459
|
+
if (result) {
|
|
78355
78460
|
evt.coordinate = result.vertex.slice(0, 2);
|
|
78356
78461
|
evt.pixel = result.vertexPixel;
|
|
78357
78462
|
}
|
|
@@ -78460,7 +78565,7 @@ var Snap = /** @class */ (function (_super) {
|
|
|
78460
78565
|
* @param {import("../pixel.js").Pixel} pixel Pixel
|
|
78461
78566
|
* @param {import("../coordinate.js").Coordinate} pixelCoordinate Coordinate
|
|
78462
78567
|
* @param {import("../PluggableMap.js").default} map Map.
|
|
78463
|
-
* @return {Result} Snap result
|
|
78568
|
+
* @return {Result|null} Snap result
|
|
78464
78569
|
*/
|
|
78465
78570
|
Snap.prototype.snapTo = function (pixel, pixelCoordinate, map) {
|
|
78466
78571
|
var lowerLeft = map.getCoordinateFromPixel([
|
|
@@ -78473,96 +78578,88 @@ var Snap = /** @class */ (function (_super) {
|
|
|
78473
78578
|
]);
|
|
78474
78579
|
var box = boundingExtent([lowerLeft, upperRight]);
|
|
78475
78580
|
var segments = this.rBush_.getInExtent(box);
|
|
78476
|
-
|
|
78477
|
-
if (
|
|
78478
|
-
|
|
78479
|
-
return segment.feature.getGeometry().getType() !== GeometryType.CIRCLE;
|
|
78480
|
-
});
|
|
78481
|
-
}
|
|
78482
|
-
var snapped = false;
|
|
78483
|
-
var vertex = null;
|
|
78484
|
-
var vertexPixel = null;
|
|
78485
|
-
if (segments.length === 0) {
|
|
78486
|
-
return {
|
|
78487
|
-
snapped: snapped,
|
|
78488
|
-
vertex: vertex,
|
|
78489
|
-
vertexPixel: vertexPixel,
|
|
78490
|
-
};
|
|
78581
|
+
var segmentsLength = segments.length;
|
|
78582
|
+
if (segmentsLength === 0) {
|
|
78583
|
+
return null;
|
|
78491
78584
|
}
|
|
78492
78585
|
var projection = map.getView().getProjection();
|
|
78493
78586
|
var projectedCoordinate = fromUserCoordinate(pixelCoordinate);
|
|
78494
|
-
var
|
|
78587
|
+
var closestVertex;
|
|
78495
78588
|
var minSquaredDistance = Infinity;
|
|
78496
|
-
|
|
78497
|
-
|
|
78498
|
-
|
|
78499
|
-
|
|
78500
|
-
|
|
78501
|
-
|
|
78502
|
-
|
|
78503
|
-
|
|
78504
|
-
|
|
78505
|
-
|
|
78506
|
-
|
|
78507
|
-
|
|
78508
|
-
|
|
78509
|
-
var pixel2 = map.getPixelFromCoordinate(closestSegment[1]);
|
|
78510
|
-
var squaredDist1 = squaredDistance$1(pixel, pixel1);
|
|
78511
|
-
var squaredDist2 = squaredDistance$1(pixel, pixel2);
|
|
78512
|
-
var dist = Math.sqrt(Math.min(squaredDist1, squaredDist2));
|
|
78513
|
-
if (dist <= this.pixelTolerance_) {
|
|
78514
|
-
snapped = true;
|
|
78515
|
-
vertex =
|
|
78516
|
-
squaredDist1 > squaredDist2 ? closestSegment[1] : closestSegment[0];
|
|
78517
|
-
vertexPixel = map.getPixelFromCoordinate(vertex);
|
|
78518
|
-
}
|
|
78519
|
-
}
|
|
78520
|
-
else if (this.edge_) {
|
|
78521
|
-
var isCircle = closestSegmentData.feature.getGeometry().getType() ===
|
|
78522
|
-
GeometryType.CIRCLE;
|
|
78523
|
-
if (isCircle) {
|
|
78524
|
-
var circleGeometry = closestSegmentData.feature.getGeometry();
|
|
78525
|
-
var userProjection = getUserProjection();
|
|
78526
|
-
if (userProjection) {
|
|
78527
|
-
circleGeometry = circleGeometry
|
|
78528
|
-
.clone()
|
|
78529
|
-
.transform(userProjection, projection);
|
|
78589
|
+
var squaredPixelTolerance = this.pixelTolerance_ * this.pixelTolerance_;
|
|
78590
|
+
var getResult = function () {
|
|
78591
|
+
if (closestVertex) {
|
|
78592
|
+
var vertexPixel = map.getPixelFromCoordinate(closestVertex);
|
|
78593
|
+
var squaredPixelDistance = squaredDistance$1(pixel, vertexPixel);
|
|
78594
|
+
if (squaredPixelDistance <= squaredPixelTolerance) {
|
|
78595
|
+
return {
|
|
78596
|
+
vertex: closestVertex,
|
|
78597
|
+
vertexPixel: [
|
|
78598
|
+
Math.round(vertexPixel[0]),
|
|
78599
|
+
Math.round(vertexPixel[1]),
|
|
78600
|
+
],
|
|
78601
|
+
};
|
|
78530
78602
|
}
|
|
78531
|
-
vertex = toUserCoordinate(closestOnCircle(projectedCoordinate,
|
|
78532
|
-
/** @type {import("../geom/Circle.js").default} */ (circleGeometry)));
|
|
78533
78603
|
}
|
|
78534
|
-
|
|
78535
|
-
|
|
78536
|
-
|
|
78537
|
-
|
|
78538
|
-
|
|
78539
|
-
|
|
78540
|
-
|
|
78541
|
-
|
|
78542
|
-
|
|
78543
|
-
|
|
78544
|
-
|
|
78545
|
-
|
|
78546
|
-
|
|
78547
|
-
|
|
78548
|
-
if (dist <= this.pixelTolerance_) {
|
|
78549
|
-
vertex =
|
|
78550
|
-
squaredDist1 > squaredDist2
|
|
78551
|
-
? closestSegment[1]
|
|
78552
|
-
: closestSegment[0];
|
|
78553
|
-
vertexPixel = map.getPixelFromCoordinate(vertex);
|
|
78554
|
-
}
|
|
78604
|
+
return null;
|
|
78605
|
+
};
|
|
78606
|
+
if (this.vertex_) {
|
|
78607
|
+
for (var i = 0; i < segmentsLength; ++i) {
|
|
78608
|
+
var segmentData = segments[i];
|
|
78609
|
+
if (segmentData.feature.getGeometry().getType() !== GeometryType.CIRCLE) {
|
|
78610
|
+
segmentData.segment.forEach(function (vertex) {
|
|
78611
|
+
var tempVertexCoord = fromUserCoordinate(vertex);
|
|
78612
|
+
var delta = squaredDistance$1(projectedCoordinate, tempVertexCoord);
|
|
78613
|
+
if (delta < minSquaredDistance) {
|
|
78614
|
+
closestVertex = vertex;
|
|
78615
|
+
minSquaredDistance = delta;
|
|
78616
|
+
}
|
|
78617
|
+
});
|
|
78555
78618
|
}
|
|
78556
78619
|
}
|
|
78620
|
+
var result = getResult();
|
|
78621
|
+
if (result) {
|
|
78622
|
+
return result;
|
|
78623
|
+
}
|
|
78557
78624
|
}
|
|
78558
|
-
if (
|
|
78559
|
-
|
|
78625
|
+
if (this.edge_) {
|
|
78626
|
+
for (var i = 0; i < segmentsLength; ++i) {
|
|
78627
|
+
var vertex = null;
|
|
78628
|
+
var segmentData = segments[i];
|
|
78629
|
+
if (segmentData.feature.getGeometry().getType() === GeometryType.CIRCLE) {
|
|
78630
|
+
var circleGeometry = segmentData.feature.getGeometry();
|
|
78631
|
+
var userProjection = getUserProjection();
|
|
78632
|
+
if (userProjection) {
|
|
78633
|
+
circleGeometry = circleGeometry
|
|
78634
|
+
.clone()
|
|
78635
|
+
.transform(userProjection, projection);
|
|
78636
|
+
}
|
|
78637
|
+
vertex = toUserCoordinate(closestOnCircle(projectedCoordinate,
|
|
78638
|
+
/** @type {import("../geom/Circle.js").default} */ (circleGeometry)));
|
|
78639
|
+
}
|
|
78640
|
+
else {
|
|
78641
|
+
var _a = segmentData.segment, segmentStart = _a[0], segmentEnd = _a[1];
|
|
78642
|
+
// points have only one coordinate
|
|
78643
|
+
if (segmentEnd) {
|
|
78644
|
+
tempSegment$1[0] = fromUserCoordinate(segmentStart);
|
|
78645
|
+
tempSegment$1[1] = fromUserCoordinate(segmentEnd);
|
|
78646
|
+
vertex = closestOnSegment(projectedCoordinate, tempSegment$1);
|
|
78647
|
+
}
|
|
78648
|
+
}
|
|
78649
|
+
if (vertex) {
|
|
78650
|
+
var delta = squaredDistance$1(projectedCoordinate, vertex);
|
|
78651
|
+
if (delta < minSquaredDistance) {
|
|
78652
|
+
closestVertex = vertex;
|
|
78653
|
+
minSquaredDistance = delta;
|
|
78654
|
+
}
|
|
78655
|
+
}
|
|
78656
|
+
}
|
|
78657
|
+
var result = getResult();
|
|
78658
|
+
if (result) {
|
|
78659
|
+
return result;
|
|
78660
|
+
}
|
|
78560
78661
|
}
|
|
78561
|
-
return
|
|
78562
|
-
snapped: snapped,
|
|
78563
|
-
vertex: vertex,
|
|
78564
|
-
vertexPixel: vertexPixel,
|
|
78565
|
-
};
|
|
78662
|
+
return null;
|
|
78566
78663
|
};
|
|
78567
78664
|
/**
|
|
78568
78665
|
* @param {import("../Feature.js").default} feature Feature
|
|
@@ -78573,140 +78670,104 @@ var Snap = /** @class */ (function (_super) {
|
|
|
78573
78670
|
this.addFeature(feature, false);
|
|
78574
78671
|
};
|
|
78575
78672
|
/**
|
|
78576
|
-
* @param {import(
|
|
78673
|
+
* @param {Array<Array<import('../coordinate.js').Coordinate>>} segments Segments
|
|
78577
78674
|
* @param {import("../geom/Circle.js").default} geometry Geometry.
|
|
78578
78675
|
* @private
|
|
78579
78676
|
*/
|
|
78580
|
-
Snap.prototype.
|
|
78677
|
+
Snap.prototype.segmentCircleGemetry_ = function (segments, geometry) {
|
|
78581
78678
|
var projection = this.getMap().getView().getProjection();
|
|
78582
78679
|
var circleGeometry = geometry;
|
|
78583
78680
|
var polygon = fromCircle(circleGeometry);
|
|
78584
78681
|
var coordinates = polygon.getCoordinates()[0];
|
|
78585
78682
|
for (var i = 0, ii = coordinates.length - 1; i < ii; ++i) {
|
|
78586
|
-
|
|
78587
|
-
var segmentData = {
|
|
78588
|
-
feature: feature,
|
|
78589
|
-
segment: segment,
|
|
78590
|
-
};
|
|
78591
|
-
this.rBush_.insert(boundingExtent(segment), segmentData);
|
|
78683
|
+
segments.push(coordinates.slice(i, i + 2));
|
|
78592
78684
|
}
|
|
78593
78685
|
};
|
|
78594
78686
|
/**
|
|
78595
|
-
* @param {import(
|
|
78687
|
+
* @param {Array<Array<import('../coordinate.js').Coordinate>>} segments Segments
|
|
78596
78688
|
* @param {import("../geom/GeometryCollection.js").default} geometry Geometry.
|
|
78597
78689
|
* @private
|
|
78598
78690
|
*/
|
|
78599
|
-
Snap.prototype.
|
|
78691
|
+
Snap.prototype.segmentGeometryCollectionGemetry_ = function (segments, geometry) {
|
|
78600
78692
|
var geometries = geometry.getGeometriesArray();
|
|
78601
78693
|
for (var i = 0; i < geometries.length; ++i) {
|
|
78602
|
-
var
|
|
78603
|
-
if (
|
|
78604
|
-
|
|
78694
|
+
var segmenter = this.GEOMETRY_SEGMENTERS_[geometries[i].getType()];
|
|
78695
|
+
if (segmenter) {
|
|
78696
|
+
segmenter(segments, geometries[i]);
|
|
78605
78697
|
}
|
|
78606
78698
|
}
|
|
78607
78699
|
};
|
|
78608
78700
|
/**
|
|
78609
|
-
* @param {import(
|
|
78701
|
+
* @param {Array<Array<import('../coordinate.js').Coordinate>>} segments Segments
|
|
78610
78702
|
* @param {import("../geom/LineString.js").default} geometry Geometry.
|
|
78611
78703
|
* @private
|
|
78612
78704
|
*/
|
|
78613
|
-
Snap.prototype.
|
|
78705
|
+
Snap.prototype.segmentLineStringGemetry_ = function (segments, geometry) {
|
|
78614
78706
|
var coordinates = geometry.getCoordinates();
|
|
78615
78707
|
for (var i = 0, ii = coordinates.length - 1; i < ii; ++i) {
|
|
78616
|
-
|
|
78617
|
-
var segmentData = {
|
|
78618
|
-
feature: feature,
|
|
78619
|
-
segment: segment,
|
|
78620
|
-
};
|
|
78621
|
-
this.rBush_.insert(boundingExtent(segment), segmentData);
|
|
78708
|
+
segments.push(coordinates.slice(i, i + 2));
|
|
78622
78709
|
}
|
|
78623
78710
|
};
|
|
78624
78711
|
/**
|
|
78625
|
-
* @param {import(
|
|
78712
|
+
* @param {Array<Array<import('../coordinate.js').Coordinate>>} segments Segments
|
|
78626
78713
|
* @param {import("../geom/MultiLineString.js").default} geometry Geometry.
|
|
78627
78714
|
* @private
|
|
78628
78715
|
*/
|
|
78629
|
-
Snap.prototype.
|
|
78716
|
+
Snap.prototype.segmentMultiLineStringGemetry_ = function (segments, geometry) {
|
|
78630
78717
|
var lines = geometry.getCoordinates();
|
|
78631
78718
|
for (var j = 0, jj = lines.length; j < jj; ++j) {
|
|
78632
78719
|
var coordinates = lines[j];
|
|
78633
78720
|
for (var i = 0, ii = coordinates.length - 1; i < ii; ++i) {
|
|
78634
|
-
|
|
78635
|
-
var segmentData = {
|
|
78636
|
-
feature: feature,
|
|
78637
|
-
segment: segment,
|
|
78638
|
-
};
|
|
78639
|
-
this.rBush_.insert(boundingExtent(segment), segmentData);
|
|
78721
|
+
segments.push(coordinates.slice(i, i + 2));
|
|
78640
78722
|
}
|
|
78641
78723
|
}
|
|
78642
78724
|
};
|
|
78643
78725
|
/**
|
|
78644
|
-
* @param {import(
|
|
78726
|
+
* @param {Array<Array<import('../coordinate.js').Coordinate>>} segments Segments
|
|
78645
78727
|
* @param {import("../geom/MultiPoint.js").default} geometry Geometry.
|
|
78646
78728
|
* @private
|
|
78647
78729
|
*/
|
|
78648
|
-
Snap.prototype.
|
|
78649
|
-
|
|
78650
|
-
|
|
78651
|
-
|
|
78652
|
-
var segmentData = {
|
|
78653
|
-
feature: feature,
|
|
78654
|
-
segment: [coordinates, coordinates],
|
|
78655
|
-
};
|
|
78656
|
-
this.rBush_.insert(geometry.getExtent(), segmentData);
|
|
78657
|
-
}
|
|
78730
|
+
Snap.prototype.segmentMultiPointGemetry_ = function (segments, geometry) {
|
|
78731
|
+
geometry.getCoordinates().forEach(function (point) {
|
|
78732
|
+
segments.push([point]);
|
|
78733
|
+
});
|
|
78658
78734
|
};
|
|
78659
78735
|
/**
|
|
78660
|
-
* @param {import(
|
|
78736
|
+
* @param {Array<Array<import('../coordinate.js').Coordinate>>} segments Segments
|
|
78661
78737
|
* @param {import("../geom/MultiPolygon.js").default} geometry Geometry.
|
|
78662
78738
|
* @private
|
|
78663
78739
|
*/
|
|
78664
|
-
Snap.prototype.
|
|
78740
|
+
Snap.prototype.segmentMultiPolygonGemetry_ = function (segments, geometry) {
|
|
78665
78741
|
var polygons = geometry.getCoordinates();
|
|
78666
78742
|
for (var k = 0, kk = polygons.length; k < kk; ++k) {
|
|
78667
78743
|
var rings = polygons[k];
|
|
78668
78744
|
for (var j = 0, jj = rings.length; j < jj; ++j) {
|
|
78669
78745
|
var coordinates = rings[j];
|
|
78670
78746
|
for (var i = 0, ii = coordinates.length - 1; i < ii; ++i) {
|
|
78671
|
-
|
|
78672
|
-
var segmentData = {
|
|
78673
|
-
feature: feature,
|
|
78674
|
-
segment: segment,
|
|
78675
|
-
};
|
|
78676
|
-
this.rBush_.insert(boundingExtent(segment), segmentData);
|
|
78747
|
+
segments.push(coordinates.slice(i, i + 2));
|
|
78677
78748
|
}
|
|
78678
78749
|
}
|
|
78679
78750
|
}
|
|
78680
78751
|
};
|
|
78681
78752
|
/**
|
|
78682
|
-
* @param {import(
|
|
78753
|
+
* @param {Array<Array<import('../coordinate.js').Coordinate>>} segments Segments
|
|
78683
78754
|
* @param {import("../geom/Point.js").default} geometry Geometry.
|
|
78684
78755
|
* @private
|
|
78685
78756
|
*/
|
|
78686
|
-
Snap.prototype.
|
|
78687
|
-
|
|
78688
|
-
var segmentData = {
|
|
78689
|
-
feature: feature,
|
|
78690
|
-
segment: [coordinates, coordinates],
|
|
78691
|
-
};
|
|
78692
|
-
this.rBush_.insert(geometry.getExtent(), segmentData);
|
|
78757
|
+
Snap.prototype.segmentPointGemetry_ = function (segments, geometry) {
|
|
78758
|
+
segments.push([geometry.getCoordinates()]);
|
|
78693
78759
|
};
|
|
78694
78760
|
/**
|
|
78695
|
-
* @param {import(
|
|
78761
|
+
* @param {Array<Array<import('../coordinate.js').Coordinate>>} segments Segments
|
|
78696
78762
|
* @param {import("../geom/Polygon.js").default} geometry Geometry.
|
|
78697
78763
|
* @private
|
|
78698
78764
|
*/
|
|
78699
|
-
Snap.prototype.
|
|
78765
|
+
Snap.prototype.segmentPolygonGemetry_ = function (segments, geometry) {
|
|
78700
78766
|
var rings = geometry.getCoordinates();
|
|
78701
78767
|
for (var j = 0, jj = rings.length; j < jj; ++j) {
|
|
78702
78768
|
var coordinates = rings[j];
|
|
78703
78769
|
for (var i = 0, ii = coordinates.length - 1; i < ii; ++i) {
|
|
78704
|
-
|
|
78705
|
-
var segmentData = {
|
|
78706
|
-
feature: feature,
|
|
78707
|
-
segment: segment,
|
|
78708
|
-
};
|
|
78709
|
-
this.rBush_.insert(boundingExtent(segment), segmentData);
|
|
78770
|
+
segments.push(coordinates.slice(i, i + 2));
|
|
78710
78771
|
}
|
|
78711
78772
|
}
|
|
78712
78773
|
};
|
|
@@ -79381,7 +79442,10 @@ var createNode$1 = function createNode(options, map) {
|
|
|
79381
79442
|
styleFn: options.styleFn,
|
|
79382
79443
|
favorite: false,
|
|
79383
79444
|
userDefaultLayer: false,
|
|
79384
|
-
selectAllLayers: options.selectAllLayers
|
|
79445
|
+
selectAllLayers: options.selectAllLayers,
|
|
79446
|
+
hoverText: options.hoverText,
|
|
79447
|
+
layerDescription: options.layerDescription,
|
|
79448
|
+
attributions: options.attributions
|
|
79385
79449
|
};
|
|
79386
79450
|
return node;
|
|
79387
79451
|
};
|
|
@@ -79890,7 +79954,10 @@ var mapLayersBundle = {
|
|
|
79890
79954
|
function formatLabeledUrl(url) {
|
|
79891
79955
|
var delim = url.indexOf("?") === -1 ? "?" : "&";
|
|
79892
79956
|
return "".concat(url).concat(delim, "label=true");
|
|
79893
|
-
}
|
|
79957
|
+
} // if (node.HoverText){
|
|
79958
|
+
// set the text popup to the hover text value
|
|
79959
|
+
// }
|
|
79960
|
+
|
|
79894
79961
|
|
|
79895
79962
|
if (node.mapLayer) {
|
|
79896
79963
|
node.labelsOn = labelsOn;
|
|
@@ -106402,7 +106469,7 @@ var config = {
|
|
|
106402
106469
|
};
|
|
106403
106470
|
|
|
106404
106471
|
var name = "@corpsmap/corpsmap";
|
|
106405
|
-
var version$1 = "3.0.
|
|
106472
|
+
var version$1 = "3.0.15";
|
|
106406
106473
|
var description = "CorpsMap as React Components";
|
|
106407
106474
|
var main = "index.js";
|
|
106408
106475
|
var scripts = {
|
|
@@ -106460,6 +106527,8 @@ var dependencies = {
|
|
|
106460
106527
|
async: "^2.6.1",
|
|
106461
106528
|
classnames: "^2.2.5",
|
|
106462
106529
|
css: "^2.2.4",
|
|
106530
|
+
decompress: "^4.2.1",
|
|
106531
|
+
"extract-files": "^12.0.0",
|
|
106463
106532
|
"file-saver": "^2.0.2",
|
|
106464
106533
|
"is-html": "^2.0.0",
|
|
106465
106534
|
jspdf: "^1.5.3",
|
|
@@ -106470,6 +106539,7 @@ var dependencies = {
|
|
|
106470
106539
|
"money-clip": "^3.0.1",
|
|
106471
106540
|
ol: "^6.4.3",
|
|
106472
106541
|
"ol-esri-style": "^2.0.7",
|
|
106542
|
+
"parse2-kmz": "^1.0.5",
|
|
106473
106543
|
proj4: "^2.4.4",
|
|
106474
106544
|
"react-data-grid": "^6.1.0",
|
|
106475
106545
|
"react-datepicker": "^2.9.6",
|
|
@@ -107302,20 +107372,38 @@ var TreeListFolder = /*#__PURE__*/function (_React$Component) {
|
|
|
107302
107372
|
key: "render",
|
|
107303
107373
|
value: function render() {
|
|
107304
107374
|
var _this$props = this.props,
|
|
107375
|
+
displayName = _this$props.displayName,
|
|
107305
107376
|
item = _this$props.item,
|
|
107306
107377
|
collapsed = _this$props.collapsed,
|
|
107307
107378
|
toggleCollapsed = _this$props.toggleCollapsed;
|
|
107379
|
+
var testText = "LAYER_X";
|
|
107380
|
+
var hoverText = testText ;
|
|
107381
|
+
var _this$props2 = this.props,
|
|
107382
|
+
isOver = _this$props2.isOver,
|
|
107383
|
+
theme = _this$props2.theme,
|
|
107384
|
+
mapZoom = _this$props2.mapZoom;
|
|
107385
|
+
var enabled = item.minzoom <= mapZoom && item.maxzoom >= mapZoom;
|
|
107386
|
+
var itemTxtStyle = enabled ? {
|
|
107387
|
+
color: "#666"
|
|
107388
|
+
} : {
|
|
107389
|
+
color: "#bbb"
|
|
107390
|
+
};
|
|
107308
107391
|
var iconClass = classnames({
|
|
107309
|
-
|
|
107392
|
+
mdi: true,
|
|
107310
107393
|
"mdi-folder-open": !collapsed,
|
|
107311
107394
|
"mdi-folder": collapsed
|
|
107312
107395
|
});
|
|
107313
107396
|
var itemClass = classnames({
|
|
107314
107397
|
"tree-list-item-hover": false
|
|
107315
107398
|
});
|
|
107399
|
+
var itemClassTest = classnames({
|
|
107400
|
+
"cm-checkbox-inline": true,
|
|
107401
|
+
"cm-checkbox-ellipsis": true,
|
|
107402
|
+
"tree-list-item-hover": isOver
|
|
107403
|
+
});
|
|
107316
107404
|
var divStyle = {
|
|
107317
|
-
display:
|
|
107318
|
-
paddingLeft:
|
|
107405
|
+
display: "inline-block",
|
|
107406
|
+
paddingLeft: "8px"
|
|
107319
107407
|
};
|
|
107320
107408
|
var count = item.children.length;
|
|
107321
107409
|
return /*#__PURE__*/React$1__default.createElement("div", null, /*#__PURE__*/React$1__default.createElement("i", {
|
|
@@ -107323,14 +107411,18 @@ var TreeListFolder = /*#__PURE__*/function (_React$Component) {
|
|
|
107323
107411
|
onClick: toggleCollapsed,
|
|
107324
107412
|
className: iconClass,
|
|
107325
107413
|
style: {
|
|
107326
|
-
fontSize:
|
|
107327
|
-
cursor:
|
|
107414
|
+
fontSize: "16px",
|
|
107415
|
+
cursor: "pointer"
|
|
107328
107416
|
}
|
|
107329
107417
|
}), /*#__PURE__*/React$1__default.createElement("span", null, /*#__PURE__*/React$1__default.createElement("div", {
|
|
107330
107418
|
className: itemClass,
|
|
107331
107419
|
style: divStyle,
|
|
107332
107420
|
onDoubleClick: toggleCollapsed
|
|
107333
|
-
}, item.displayName), /*#__PURE__*/React$1__default.createElement("span", null,
|
|
107421
|
+
}, item.displayName), /*#__PURE__*/React$1__default.createElement("span", null, " (" + count + ")"), /*#__PURE__*/React$1__default.createElement("label", {
|
|
107422
|
+
className: itemClassTest,
|
|
107423
|
+
title: "".concat(hoverText, " ").concat(!enabled ? "- zoom in to enable" : ""),
|
|
107424
|
+
style: itemTxtStyle
|
|
107425
|
+
})));
|
|
107334
107426
|
}
|
|
107335
107427
|
}]);
|
|
107336
107428
|
|
|
@@ -132541,12 +132633,21 @@ var bundle = {
|
|
|
132541
132633
|
var u8arr = new Uint8Array(fileInfo);
|
|
132542
132634
|
var decodedFileInfo = utf8decoder.decode(u8arr);
|
|
132543
132635
|
console.log(decodedFileInfo); // read in our KML file and then parse it
|
|
132544
|
-
|
|
132545
|
-
|
|
132636
|
+
// const KMZ = new DOMParser().parseFromString(decodedFileInfo);
|
|
132637
|
+
// convert our kml to geojson and store the results
|
|
132546
132638
|
// const geojson = KMLConvert.kml(parsedKML);
|
|
132639
|
+
// const file1 = new File(["1"], "BuxtonNC.kmz", {
|
|
132640
|
+
// type: "text/plain",
|
|
132641
|
+
// });
|
|
132642
|
+
// const value = {
|
|
132643
|
+
// a: file1,
|
|
132644
|
+
// };
|
|
132645
|
+
// const { clone, files } = extractFiles(
|
|
132646
|
+
// value,
|
|
132647
|
+
// isExtractableFile,
|
|
132648
|
+
// "prefix"
|
|
132649
|
+
// );
|
|
132547
132650
|
// store.doAddDataGeojson(file.name, geojson);
|
|
132548
|
-
|
|
132549
|
-
console.log(parsedKMZ);
|
|
132550
132651
|
} catch (err) {
|
|
132551
132652
|
store.doDispatchNotification(err.message || "Error adding data");
|
|
132552
132653
|
}
|
|
@@ -132649,6 +132750,22 @@ var plugin = {
|
|
|
132649
132750
|
}]
|
|
132650
132751
|
};
|
|
132651
132752
|
|
|
132753
|
+
var formatArcgisrest = function formatArcgisrest(attributes) {
|
|
132754
|
+
for (var _i = 0, _Object$entries = Object.entries(attributes); _i < _Object$entries.length; _i++) {
|
|
132755
|
+
var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2),
|
|
132756
|
+
key = _Object$entries$_i[0],
|
|
132757
|
+
value = _Object$entries$_i[1];
|
|
132758
|
+
|
|
132759
|
+
var result = value.includes("https:") || value.includes("http:") ? value : null;
|
|
132760
|
+
|
|
132761
|
+
if (result) {
|
|
132762
|
+
attributes[key] = "<a href=\"".concat(value, "\" target=\"_new\" > ").concat(value, " </a>");
|
|
132763
|
+
}
|
|
132764
|
+
}
|
|
132765
|
+
|
|
132766
|
+
return attributes;
|
|
132767
|
+
};
|
|
132768
|
+
|
|
132652
132769
|
function formatUrl(options) {
|
|
132653
132770
|
var url = "".concat(options.root, "/identify?");
|
|
132654
132771
|
var params = [];
|
|
@@ -132761,7 +132878,7 @@ var bundle$1 = {
|
|
|
132761
132878
|
type: featureType,
|
|
132762
132879
|
coordinates: coords
|
|
132763
132880
|
},
|
|
132764
|
-
properties: feat.attributes
|
|
132881
|
+
properties: formatArcgisrest(feat.attributes)
|
|
132765
132882
|
};
|
|
132766
132883
|
})
|
|
132767
132884
|
})
|
|
@@ -157630,6 +157747,7 @@ var TreeListItemDataset = /*#__PURE__*/function (_React$Component) {
|
|
|
157630
157747
|
showLegend: false,
|
|
157631
157748
|
visible: props.item.visible,
|
|
157632
157749
|
displayName: props.item.displayName,
|
|
157750
|
+
hoverText: props.item.hoverText,
|
|
157633
157751
|
type: props.item.type,
|
|
157634
157752
|
expanded: false
|
|
157635
157753
|
};
|
|
@@ -157719,7 +157837,9 @@ var TreeListItemDataset = /*#__PURE__*/function (_React$Component) {
|
|
|
157719
157837
|
type = item.type,
|
|
157720
157838
|
identifyType = item.identifyType,
|
|
157721
157839
|
favorite = item.favorite,
|
|
157722
|
-
userDefaultLayer = item.userDefaultLayer
|
|
157840
|
+
userDefaultLayer = item.userDefaultLayer,
|
|
157841
|
+
hoverText = item.hoverText;
|
|
157842
|
+
var hoverTextDisplay = hoverText ? hoverText : displayName;
|
|
157723
157843
|
if (!item.passFilter) return null;
|
|
157724
157844
|
var enabled = item.minzoom <= mapZoom && item.maxzoom >= mapZoom;
|
|
157725
157845
|
var itemTxtStyle = enabled ? {
|
|
@@ -157753,7 +157873,7 @@ var TreeListItemDataset = /*#__PURE__*/function (_React$Component) {
|
|
|
157753
157873
|
title: "More Info"
|
|
157754
157874
|
}))), /*#__PURE__*/React$1__default.createElement("label", {
|
|
157755
157875
|
className: itemClass,
|
|
157756
|
-
title: "".concat(
|
|
157876
|
+
title: "".concat(hoverTextDisplay, " ").concat(!enabled ? "- zoom in to enable" : ""),
|
|
157757
157877
|
style: itemTxtStyle
|
|
157758
157878
|
}, /*#__PURE__*/React$1__default.createElement("input", {
|
|
157759
157879
|
disabled: !enabled,
|
|
@@ -158558,9 +158678,13 @@ var bundle$7 = {
|
|
|
158558
158678
|
type = lyr.type,
|
|
158559
158679
|
layerList = lyr.layerList,
|
|
158560
158680
|
uid = lyr.uid,
|
|
158561
|
-
displayName = lyr.displayName
|
|
158681
|
+
displayName = lyr.displayName,
|
|
158682
|
+
layerDescription = lyr.layerDescription,
|
|
158683
|
+
attributions = lyr.attributions;
|
|
158562
158684
|
legendCanvases[uid] = {
|
|
158563
158685
|
displayName: displayName,
|
|
158686
|
+
layerDescription: layerDescription,
|
|
158687
|
+
attributions: attributions,
|
|
158564
158688
|
canvas: [],
|
|
158565
158689
|
widths: [],
|
|
158566
158690
|
heights: []
|
|
@@ -158626,12 +158750,16 @@ var bundle$7 = {
|
|
|
158626
158750
|
store = _ref3.store;
|
|
158627
158751
|
var uid = lyr.uid,
|
|
158628
158752
|
layerList = lyr.layerList,
|
|
158629
|
-
displayName = lyr.displayName
|
|
158753
|
+
displayName = lyr.displayName,
|
|
158754
|
+
layerDescription = lyr.layerDescription,
|
|
158755
|
+
attributions = lyr.attributions;
|
|
158630
158756
|
var legendLayers = store.selectLegendLayers();
|
|
158631
158757
|
var legendCanvases = store.selectLegendCanvases();
|
|
158632
158758
|
var activeLayers = layerList.replace(/show:/g, "").split(",").map(Number);
|
|
158633
158759
|
legendCanvases[uid] = {
|
|
158634
158760
|
displayName: displayName,
|
|
158761
|
+
layerDescription: layerDescription,
|
|
158762
|
+
attributions: attributions,
|
|
158635
158763
|
canvas: [],
|
|
158636
158764
|
widths: [],
|
|
158637
158765
|
heights: []
|
|
@@ -158692,12 +158820,16 @@ var bundle$7 = {
|
|
|
158692
158820
|
var dispatch = _ref4.dispatch,
|
|
158693
158821
|
store = _ref4.store;
|
|
158694
158822
|
var uid = lyr.uid,
|
|
158695
|
-
displayName = lyr.displayName
|
|
158823
|
+
displayName = lyr.displayName,
|
|
158824
|
+
layerDescription = lyr.layerDescription,
|
|
158825
|
+
attributions = lyr.attributions;
|
|
158696
158826
|
var legendLayers = store.selectLegendLayers();
|
|
158697
158827
|
var legendCanvases = store.selectLegendCanvases();
|
|
158698
158828
|
var drawingInfo = data.drawingInfo;
|
|
158699
158829
|
legendCanvases[uid] = {
|
|
158700
158830
|
displayName: displayName,
|
|
158831
|
+
layerDescription: layerDescription,
|
|
158832
|
+
attributions: attributions,
|
|
158701
158833
|
canvas: [],
|
|
158702
158834
|
widths: [],
|
|
158703
158835
|
heights: []
|
|
@@ -160299,7 +160431,26 @@ var bundle$a = {
|
|
|
160299
160431
|
legendCanvases[layer.uid].canvas.forEach(function (item) {
|
|
160300
160432
|
layerCTX.drawImage(item, 0, dy);
|
|
160301
160433
|
dy += Number(item.height);
|
|
160302
|
-
});
|
|
160434
|
+
}); //add layerDescription
|
|
160435
|
+
// if(legendCanvases[layer.uid].layerDescription) {
|
|
160436
|
+
// dy += 50;
|
|
160437
|
+
// layerCTX.font = "bold 12px Arial";
|
|
160438
|
+
// layerCTX.fillStyle = "black";
|
|
160439
|
+
// layerCTX.fillText("Layer Description: ", 0, dy);
|
|
160440
|
+
// dy += 20;
|
|
160441
|
+
// layerCTX.fillText(legendCanvases[layer.uid].layerDescription, 0, dy);
|
|
160442
|
+
// }
|
|
160443
|
+
//add attribution
|
|
160444
|
+
|
|
160445
|
+
if (legendCanvases[layer.uid].attributions) {
|
|
160446
|
+
dy += 50;
|
|
160447
|
+
layerCTX.font = "bold 12px Arial";
|
|
160448
|
+
layerCTX.fillStyle = "black";
|
|
160449
|
+
layerCTX.fillText("Credits: ", 0, dy);
|
|
160450
|
+
dy += 20;
|
|
160451
|
+
layerCTX.fillText(legendCanvases[layer.uid].attributions, 0, dy);
|
|
160452
|
+
}
|
|
160453
|
+
|
|
160303
160454
|
canvases.push(layerCanvas);
|
|
160304
160455
|
} else {
|
|
160305
160456
|
//set canvas dimensions
|
|
@@ -161006,7 +161157,7 @@ var LayerSubpanel = function LayerSubpanel(props) {
|
|
|
161006
161157
|
});
|
|
161007
161158
|
var listTop = primaryPanelShowClose ? 70 : 30;
|
|
161008
161159
|
var showDownload = treeViewDownloadEnabled && treeViewSelectedItem.identifyType === "MAP" ? true : false;
|
|
161009
|
-
var url = treeViewSelectedItem.identifyType == "MAP" ? "".concat(treeViewSelectedItem.url, "
|
|
161160
|
+
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;
|
|
161010
161161
|
return /*#__PURE__*/React$1__default.createElement("div", null, /*#__PURE__*/React$1__default.createElement("div", null, /*#__PURE__*/React$1__default.createElement("span", {
|
|
161011
161162
|
onClick: doRenderTreeView,
|
|
161012
161163
|
title: "Go back",
|
|
@@ -161032,7 +161183,7 @@ var LayerSubpanel = function LayerSubpanel(props) {
|
|
|
161032
161183
|
title: "Source for ".concat(treeViewSelectedItem.displayName),
|
|
161033
161184
|
href: url,
|
|
161034
161185
|
target: "_blank"
|
|
161035
|
-
}, "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, {
|
|
161186
|
+
}, "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, {
|
|
161036
161187
|
layer: treeViewSelectedItem
|
|
161037
161188
|
}) : null, /*#__PURE__*/React$1__default.createElement("p", null), primaryPanelShowUserDefaultLayersBtn ? /*#__PURE__*/React$1__default.createElement(DefaultsToggle$1, {
|
|
161038
161189
|
layer: treeViewSelectedItem
|
|
@@ -161633,7 +161784,7 @@ var treeViewDownload = {
|
|
|
161633
161784
|
var url = null;
|
|
161634
161785
|
|
|
161635
161786
|
if (layer.identifyType === "MAP") {
|
|
161636
|
-
var params = "
|
|
161787
|
+
var params = "?&service=WFS&version=1.1.0&request=GetFeature&typeName=".concat(layer.layerList, "&outputformat=").concat(format, "&outfile=").concat(layer.layerList);
|
|
161637
161788
|
url = "".concat(layer.url).concat(params);
|
|
161638
161789
|
}
|
|
161639
161790
|
|
|
@@ -161708,7 +161859,7 @@ var treeViewDownload = {
|
|
|
161708
161859
|
|
|
161709
161860
|
switch (layer.identifyType) {
|
|
161710
161861
|
case "MAP":
|
|
161711
|
-
var params = "
|
|
161862
|
+
var params = "?&service=WFS&version=1.1.0&request=GetFeature&typeName=".concat(layer.layerList, "&outputformat=").concat(format, "&outfile=").concat(layer.layerList);
|
|
161712
161863
|
url = "".concat(layer.url).concat(params);
|
|
161713
161864
|
break;
|
|
161714
161865
|
}
|