@opengeoweb/webmap 4.10.0 → 4.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.esm.js +255 -380
- package/index.umd.js +259 -397
- package/lib/components/WMJSService.d.ts +5 -20
- package/lib/components/WMJSTools.d.ts +32 -1
- package/lib/components/WMLayer.d.ts +6 -8
- package/package.json +3 -2
package/index.esm.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { debounce, throttle } from 'throttle-debounce';
|
|
2
|
+
import { compact } from 'lodash';
|
|
2
3
|
import moment from 'moment';
|
|
3
4
|
import proj4 from 'proj4';
|
|
4
5
|
|
|
@@ -200,6 +201,33 @@ var mapImageStoreLength = 1000;
|
|
|
200
201
|
var bgImageStoreLength = 360;
|
|
201
202
|
var legendImageStoreLength = 500;
|
|
202
203
|
|
|
204
|
+
/*! *****************************************************************************
|
|
205
|
+
Copyright (c) Microsoft Corporation.
|
|
206
|
+
|
|
207
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
208
|
+
purpose with or without fee is hereby granted.
|
|
209
|
+
|
|
210
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
211
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
212
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
213
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
214
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
215
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
216
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
217
|
+
***************************************************************************** */
|
|
218
|
+
|
|
219
|
+
function __rest(s, e) {
|
|
220
|
+
var t = {};
|
|
221
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
222
|
+
t[p] = s[p];
|
|
223
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
224
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
225
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
226
|
+
t[p[i]] = s[p[i]];
|
|
227
|
+
}
|
|
228
|
+
return t;
|
|
229
|
+
}
|
|
230
|
+
|
|
203
231
|
/* debug helper */
|
|
204
232
|
|
|
205
233
|
var enableConsoleDebugging = false;
|
|
@@ -228,20 +256,6 @@ var isDefined = function isDefined(variable) {
|
|
|
228
256
|
|
|
229
257
|
return true;
|
|
230
258
|
};
|
|
231
|
-
/**
|
|
232
|
-
* Checks if a variable is null or not
|
|
233
|
-
* @param variable The variable to check
|
|
234
|
-
* @returns true if variable is indeed null, otherwise false.
|
|
235
|
-
*/
|
|
236
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types,@typescript-eslint/no-explicit-any
|
|
237
|
-
|
|
238
|
-
var isNull = function isNull(variable) {
|
|
239
|
-
if (variable === null) {
|
|
240
|
-
return true;
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
return false;
|
|
244
|
-
};
|
|
245
259
|
/**
|
|
246
260
|
* Converts a variable to an array. If the variable is not an array it will be pushed as the first entry in a new array. If the variable is already an array, nothing will be done.
|
|
247
261
|
* @param array The variable to convert
|
|
@@ -493,14 +507,27 @@ var addStylesForLayer = function addStylesForLayer(layerObjectFromWMS) {
|
|
|
493
507
|
var addDimensionsForLayer = function addDimensionsForLayer(layerObjectFromWMS) {
|
|
494
508
|
if (!layerObjectFromWMS.Dimension) return [];
|
|
495
509
|
var layerDimensions = toArray(layerObjectFromWMS.Dimension);
|
|
496
|
-
var
|
|
510
|
+
var layerDimensionsExtents = toArray(layerObjectFromWMS.Extent);
|
|
511
|
+
var dimensionList = layerDimensions.map(function (layerDimension) {
|
|
512
|
+
var dimensionName = layerDimension.attr && layerDimension.attr.name.toLowerCase();
|
|
513
|
+
/* Find corresponding Dimension Extent if given */
|
|
514
|
+
|
|
515
|
+
var dimExtentIndex = layerDimensionsExtents.findIndex(function (layerDimensionsExtent) {
|
|
516
|
+
var extentName = layerDimensionsExtent.attr && layerDimensionsExtent.attr.name && layerDimensionsExtent.attr.name.toLowerCase();
|
|
517
|
+
return dimensionName === extentName;
|
|
518
|
+
});
|
|
519
|
+
var dimExtent = dimExtentIndex !== -1 ? layerDimensionsExtents[dimExtentIndex] : null;
|
|
520
|
+
var dimensionValues = dimExtent && dimExtent.value || layerDimension.value || '';
|
|
521
|
+
var dimensionCurrentValue = dimExtent && dimExtent.attr && dimExtent.attr["default"] || layerDimension.attr["default"] || '';
|
|
497
522
|
return {
|
|
498
|
-
name:
|
|
523
|
+
name: dimensionName,
|
|
499
524
|
units: layerDimension.attr.units,
|
|
500
|
-
currentValue:
|
|
525
|
+
currentValue: dimensionCurrentValue.trim(),
|
|
526
|
+
unitSymbol: layerDimension.attr.unitSymbol,
|
|
527
|
+
values: dimensionValues.trim()
|
|
501
528
|
};
|
|
502
529
|
});
|
|
503
|
-
return
|
|
530
|
+
return dimensionList;
|
|
504
531
|
};
|
|
505
532
|
var addBoundingBoxForLayer = function addBoundingBoxForLayer(layerObjectFromWMS) {
|
|
506
533
|
var _a, _b, _c, _d;
|
|
@@ -508,10 +535,10 @@ var addBoundingBoxForLayer = function addBoundingBoxForLayer(layerObjectFromWMS)
|
|
|
508
535
|
if (layerObjectFromWMS.EX_GeographicBoundingBox) {
|
|
509
536
|
var layerBbox = layerObjectFromWMS.EX_GeographicBoundingBox;
|
|
510
537
|
return {
|
|
511
|
-
east: (
|
|
512
|
-
west: (
|
|
513
|
-
north: (
|
|
514
|
-
south: (
|
|
538
|
+
east: (_a = layerBbox.eastBoundLongitude) === null || _a === void 0 ? void 0 : _a.value,
|
|
539
|
+
west: (_b = layerBbox.westBoundLongitude) === null || _b === void 0 ? void 0 : _b.value,
|
|
540
|
+
north: (_c = layerBbox.northBoundLatitude) === null || _c === void 0 ? void 0 : _c.value,
|
|
541
|
+
south: (_d = layerBbox.southBoundLatitude) === null || _d === void 0 ? void 0 : _d.value
|
|
515
542
|
};
|
|
516
543
|
}
|
|
517
544
|
|
|
@@ -527,6 +554,141 @@ var addBoundingBoxForLayer = function addBoundingBoxForLayer(layerObjectFromWMS)
|
|
|
527
554
|
|
|
528
555
|
return undefined;
|
|
529
556
|
};
|
|
557
|
+
/**
|
|
558
|
+
* Sorts an array with objects by object key.
|
|
559
|
+
*
|
|
560
|
+
* @param array Array of objects
|
|
561
|
+
* @param key The key of the object to use for sorting
|
|
562
|
+
* @returns Sorted array.
|
|
563
|
+
*/
|
|
564
|
+
|
|
565
|
+
function sortArrayOfObjectsByKey(array, key) {
|
|
566
|
+
var spreadArray = _toConsumableArray(array);
|
|
567
|
+
|
|
568
|
+
return spreadArray.sort(function (a, b) {
|
|
569
|
+
var x = a[key];
|
|
570
|
+
var y = b[key];
|
|
571
|
+
if (x < y) return -1;
|
|
572
|
+
if (x > y) return 1;
|
|
573
|
+
return 0;
|
|
574
|
+
});
|
|
575
|
+
}
|
|
576
|
+
/**
|
|
577
|
+
* A LayerTree with deeply nested children will be flattened into a 1D array. Children properties are removed and result is sorted alphabetically by the layers title.
|
|
578
|
+
* @param layerTree a WMS LayerTree
|
|
579
|
+
* @returns Flat array of layers as LayerProps[]
|
|
580
|
+
*/
|
|
581
|
+
|
|
582
|
+
var flattenLayerTree = function flattenLayerTree(layerTree) {
|
|
583
|
+
var omit = function omit(prop, _a) {
|
|
584
|
+
var _b = prop;
|
|
585
|
+
_a[_b];
|
|
586
|
+
var rest = __rest(_a, [_typeof(_b) === "symbol" ? _b : _b + ""]);
|
|
587
|
+
|
|
588
|
+
return rest;
|
|
589
|
+
};
|
|
590
|
+
|
|
591
|
+
var recurseLayerTree = function recurseLayerTree(data) {
|
|
592
|
+
return data && Array.isArray(data) ? data.reduce(function (acc, item) {
|
|
593
|
+
item.name && acc.push(omit('children', item));
|
|
594
|
+
item.children && acc.push.apply(acc, _toConsumableArray(recurseLayerTree(item.children)));
|
|
595
|
+
return acc;
|
|
596
|
+
}, []) : [];
|
|
597
|
+
};
|
|
598
|
+
|
|
599
|
+
var flatLayerObject = recurseLayerTree(layerTree.children);
|
|
600
|
+
return sortArrayOfObjectsByKey(flatLayerObject, 'title');
|
|
601
|
+
};
|
|
602
|
+
/**
|
|
603
|
+
* Makes a LayerProps object from the WMSLayerFromGetCapabilities and nestedLayerPath
|
|
604
|
+
* @param layer WMSLayerFromGetCapabilities
|
|
605
|
+
* @param path The path of the layer in the WMS GetCapabilities tree (Array of strings)
|
|
606
|
+
* @param isleaf Is this a group layer or an actual layer
|
|
607
|
+
* @param nestedLayerPath The path of the layer in the WMS GetCapabilities, in this case array of LayerProps
|
|
608
|
+
* @returns
|
|
609
|
+
*/
|
|
610
|
+
|
|
611
|
+
var makeNodeLayerFromWMSGetCapabilityLayer = function makeNodeLayerFromWMSGetCapabilityLayer(layer) {
|
|
612
|
+
var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
613
|
+
var isleaf = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
614
|
+
var nestedLayerPath = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
|
|
615
|
+
var geographicBoundingBox = nestedLayerPath.reverse().reduce(function (p, c) {
|
|
616
|
+
return p || c.geographicBoundingBox;
|
|
617
|
+
}, addBoundingBoxForLayer(layer));
|
|
618
|
+
var dimensions = nestedLayerPath.reverse().reduce(function (p, c) {
|
|
619
|
+
if (p && Array.isArray(p) && p.length > 0) {
|
|
620
|
+
return p;
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
return c.dimensions || [];
|
|
624
|
+
}, addDimensionsForLayer(layer));
|
|
625
|
+
var styles = nestedLayerPath.reverse().reduce(function (p, c) {
|
|
626
|
+
if (c.styles && Array.isArray(c.styles) && c.styles.length) {
|
|
627
|
+
return c.styles.concat(p);
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
return p;
|
|
631
|
+
}, addStylesForLayer(layer));
|
|
632
|
+
var queryable = layer.attr ? parseInt(layer.attr.queryable, 10) === 1 : false;
|
|
633
|
+
var crs = layer.BoundingBox && Array.isArray(layer.BoundingBox) && layer.BoundingBox.length ? compact(layer.BoundingBox.map(function (wmsBBOX) {
|
|
634
|
+
if (wmsBBOX.attr) {
|
|
635
|
+
var crsName = wmsBBOX.attr.CRS || wmsBBOX.attr.SRS;
|
|
636
|
+
return {
|
|
637
|
+
name: crsName,
|
|
638
|
+
bbox: {
|
|
639
|
+
left: parseFloat(wmsBBOX.attr.minx),
|
|
640
|
+
right: parseFloat(wmsBBOX.attr.maxx),
|
|
641
|
+
bottom: parseFloat(wmsBBOX.attr.miny),
|
|
642
|
+
top: parseFloat(wmsBBOX.attr.maxy)
|
|
643
|
+
}
|
|
644
|
+
};
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
return undefined;
|
|
648
|
+
})) : [];
|
|
649
|
+
return {
|
|
650
|
+
name: layer.Name ? layer.Name.value : null,
|
|
651
|
+
title: layer.Title ? layer.Title.value : 'Layer',
|
|
652
|
+
leaf: isleaf,
|
|
653
|
+
path: path,
|
|
654
|
+
keywords: toArray(layer.KeywordList && layer.KeywordList.Keyword).map(function (keywords) {
|
|
655
|
+
return keywords.value;
|
|
656
|
+
}),
|
|
657
|
+
"abstract": layer.Abstract ? layer.Abstract.value : undefined,
|
|
658
|
+
styles: styles,
|
|
659
|
+
dimensions: dimensions,
|
|
660
|
+
geographicBoundingBox: geographicBoundingBox,
|
|
661
|
+
queryable: queryable,
|
|
662
|
+
crs: crs
|
|
663
|
+
};
|
|
664
|
+
};
|
|
665
|
+
/**
|
|
666
|
+
* Builds a standardized LayerTree object based on WMSLayerFromGetCapabilities object.
|
|
667
|
+
* @param wmsLayer The WMSLayerFromGetCapabilities object
|
|
668
|
+
* @param nestedPath - Optional, only to be used by buildLayerTreeFromNestedWMSLayer
|
|
669
|
+
* @param nestedLayerPath - Optional, only to be used by buildLayerTreeFromNestedWMSLayer
|
|
670
|
+
* @returns A LayerTree object.
|
|
671
|
+
*/
|
|
672
|
+
|
|
673
|
+
var buildLayerTreeFromNestedWMSLayer = function buildLayerTreeFromNestedWMSLayer(wmsLayer) {
|
|
674
|
+
var nestedPath = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
675
|
+
var nestedLayerPath = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
|
|
676
|
+
var isleaf = wmsLayer.Name && !wmsLayer.Layer;
|
|
677
|
+
var layerProps = makeNodeLayerFromWMSGetCapabilityLayer(wmsLayer, nestedPath, isleaf, nestedLayerPath);
|
|
678
|
+
var pathName = wmsLayer.Title && wmsLayer.Title.value || '';
|
|
679
|
+
var layerTree = Object.assign(Object.assign({}, layerProps), {
|
|
680
|
+
children: []
|
|
681
|
+
});
|
|
682
|
+
|
|
683
|
+
if (wmsLayer.Layer) {
|
|
684
|
+
var childLayers = wmsLayer.Layer['length'] ? wmsLayer.Layer : [wmsLayer.Layer];
|
|
685
|
+
layerTree.children = sortArrayOfObjectsByKey(childLayers.map(function (layerChild) {
|
|
686
|
+
return buildLayerTreeFromNestedWMSLayer(layerChild, [].concat(_toConsumableArray(nestedPath), [pathName]), [].concat(_toConsumableArray(nestedLayerPath), [layerProps]));
|
|
687
|
+
}), 'title');
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
return layerTree;
|
|
691
|
+
};
|
|
530
692
|
|
|
531
693
|
/**
|
|
532
694
|
* Returns the current time in ms
|
|
@@ -1123,7 +1285,7 @@ var WMBBOX = /*#__PURE__*/function () {
|
|
|
1123
1285
|
key: "setBBOX",
|
|
1124
1286
|
value: function setBBOX(left, bottom, right, top) {
|
|
1125
1287
|
/* Check if we recieve more than one parameter by checking the second bottom parameter. */
|
|
1126
|
-
if (bottom) {
|
|
1288
|
+
if (bottom !== undefined) {
|
|
1127
1289
|
this.left = left; // -180; // 0
|
|
1128
1290
|
|
|
1129
1291
|
this.bottom = bottom; // -90; // 1`
|
|
@@ -1135,7 +1297,7 @@ var WMBBOX = /*#__PURE__*/function () {
|
|
|
1135
1297
|
/* Check if we recieve more than one parameter by checking the second bottom parameter. */
|
|
1136
1298
|
|
|
1137
1299
|
|
|
1138
|
-
if (
|
|
1300
|
+
if (bottom === undefined) {
|
|
1139
1301
|
/* Otherwise it can be a bbox object or a string in the form "left,bottom,right,top" */
|
|
1140
1302
|
if (_typeof(left) === 'object') {
|
|
1141
1303
|
/* A bbox object is given, so it is not a string */
|
|
@@ -7673,63 +7835,6 @@ var WMJSGetCapabilities = function WMJSGetCapabilities(service, succes, fail, op
|
|
|
7673
7835
|
}, WMServiceStoreXML2JSONRequest.proxy);
|
|
7674
7836
|
});
|
|
7675
7837
|
};
|
|
7676
|
-
var sortByKey = function sortByKey(array, key) {
|
|
7677
|
-
return array.sort(function (a, b) {
|
|
7678
|
-
var x = a[key];
|
|
7679
|
-
var y = b[key];
|
|
7680
|
-
if (x < y) return -1;
|
|
7681
|
-
if (x > y) return 1;
|
|
7682
|
-
return 0;
|
|
7683
|
-
});
|
|
7684
|
-
};
|
|
7685
|
-
var recursivelyFindLayer = function recursivelyFindLayer( // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
7686
|
-
layers, // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
7687
|
-
rootNode, path) {
|
|
7688
|
-
for (var j = 0; j < layers.length; j += 1) {
|
|
7689
|
-
var isleaf = false;
|
|
7690
|
-
if (layers[j].Name) isleaf = true;
|
|
7691
|
-
|
|
7692
|
-
try {
|
|
7693
|
-
if (layers[j].Layer) isleaf = false;
|
|
7694
|
-
} catch (e) {// do nothing
|
|
7695
|
-
}
|
|
7696
|
-
|
|
7697
|
-
var nodeObject = void 0;
|
|
7698
|
-
|
|
7699
|
-
if (layers[j].Name) {
|
|
7700
|
-
nodeObject = {
|
|
7701
|
-
name: layers[j].Name.value,
|
|
7702
|
-
title: layers[j].Title.value,
|
|
7703
|
-
leaf: isleaf,
|
|
7704
|
-
path: path,
|
|
7705
|
-
keywords: toArray(layers[j].KeywordList && layers[j].KeywordList.Keyword).map(function (keywords) {
|
|
7706
|
-
return keywords.value;
|
|
7707
|
-
}),
|
|
7708
|
-
"abstract": layers[j].Abstract && layers[j].Abstract.value,
|
|
7709
|
-
styles: addStylesForLayer(layers[j]),
|
|
7710
|
-
dimensions: addDimensionsForLayer(layers[j]),
|
|
7711
|
-
geographicBoundingBox: addBoundingBoxForLayer(layers[j])
|
|
7712
|
-
};
|
|
7713
|
-
} else {
|
|
7714
|
-
var nodeText = isNull(layers[j].Title) ? 'Layer' : layers[j].Title.value;
|
|
7715
|
-
nodeObject = {
|
|
7716
|
-
title: nodeText,
|
|
7717
|
-
leaf: isleaf,
|
|
7718
|
-
styles: []
|
|
7719
|
-
};
|
|
7720
|
-
}
|
|
7721
|
-
|
|
7722
|
-
rootNode.push(nodeObject);
|
|
7723
|
-
|
|
7724
|
-
if (layers[j].Layer) {
|
|
7725
|
-
nodeObject.children = [];
|
|
7726
|
-
recursivelyFindLayer(toArray(layers[j].Layer), nodeObject.children, [].concat(_toConsumableArray(path), [layers[j].Title.value]));
|
|
7727
|
-
}
|
|
7728
|
-
} // Sort nodes alphabetically.
|
|
7729
|
-
|
|
7730
|
-
|
|
7731
|
-
sortByKey(rootNode, 'title');
|
|
7732
|
-
};
|
|
7733
7838
|
var generatedServiceIds = 0;
|
|
7734
7839
|
|
|
7735
7840
|
var generateWMJSServiceId = function generateWMJSServiceId() {
|
|
@@ -7886,7 +7991,8 @@ var WMJSService = /*#__PURE__*/function () {
|
|
|
7886
7991
|
|
|
7887
7992
|
}, {
|
|
7888
7993
|
key: "getCapabilities",
|
|
7889
|
-
value: function getCapabilities(succescallback, failcallback, forceReload,
|
|
7994
|
+
value: function getCapabilities(succescallback, failcallback, forceReload, // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
|
7995
|
+
options) {
|
|
7890
7996
|
var _this = this;
|
|
7891
7997
|
|
|
7892
7998
|
if (options) {
|
|
@@ -8034,15 +8140,6 @@ var WMJSService = /*#__PURE__*/function () {
|
|
|
8034
8140
|
}
|
|
8035
8141
|
|
|
8036
8142
|
var parse = function parse(jsonData) {
|
|
8037
|
-
var nodeStructure = {
|
|
8038
|
-
leaf: false,
|
|
8039
|
-
expanded: true,
|
|
8040
|
-
children: [],
|
|
8041
|
-
title: '',
|
|
8042
|
-
keywords: [],
|
|
8043
|
-
"abstract": ''
|
|
8044
|
-
};
|
|
8045
|
-
|
|
8046
8143
|
var rootLayer = _this2.getCapabilityElement(jsonData).Layer;
|
|
8047
8144
|
|
|
8048
8145
|
try {
|
|
@@ -8052,16 +8149,8 @@ var WMJSService = /*#__PURE__*/function () {
|
|
|
8052
8149
|
return;
|
|
8053
8150
|
}
|
|
8054
8151
|
|
|
8055
|
-
var
|
|
8056
|
-
|
|
8057
|
-
try {
|
|
8058
|
-
nodeStructure.title = rootLayer.Title.value;
|
|
8059
|
-
} catch (e) {
|
|
8060
|
-
nodeStructure.title = I18n.unnamed_service.text;
|
|
8061
|
-
}
|
|
8062
|
-
|
|
8063
|
-
recursivelyFindLayer(WMSLayers, nodeStructure.children, []);
|
|
8064
|
-
succes(nodeStructure);
|
|
8152
|
+
var layerTreeStructure = buildLayerTreeFromNestedWMSLayer(rootLayer);
|
|
8153
|
+
succes(layerTreeStructure);
|
|
8065
8154
|
};
|
|
8066
8155
|
|
|
8067
8156
|
var callback = function callback(jsonData) {
|
|
@@ -8090,22 +8179,8 @@ var WMJSService = /*#__PURE__*/function () {
|
|
|
8090
8179
|
return;
|
|
8091
8180
|
}
|
|
8092
8181
|
|
|
8093
|
-
var callback = function callback(
|
|
8094
|
-
_this3._flatLayerObject =
|
|
8095
|
-
|
|
8096
|
-
var getNames = function getNames(layers) {
|
|
8097
|
-
for (var j = 0; j < layers.length; j += 1) {
|
|
8098
|
-
if (layers[j].name) {
|
|
8099
|
-
_this3._flatLayerObject.push(layers[j]);
|
|
8100
|
-
}
|
|
8101
|
-
|
|
8102
|
-
if (layers[j].children) {
|
|
8103
|
-
getNames(layers[j].children);
|
|
8104
|
-
}
|
|
8105
|
-
}
|
|
8106
|
-
};
|
|
8107
|
-
|
|
8108
|
-
getNames(data.children);
|
|
8182
|
+
var callback = function callback(layerTree) {
|
|
8183
|
+
_this3._flatLayerObject = flattenLayerTree(layerTree);
|
|
8109
8184
|
succes(_this3._flatLayerObject);
|
|
8110
8185
|
};
|
|
8111
8186
|
|
|
@@ -8162,58 +8237,24 @@ var LayerType;
|
|
|
8162
8237
|
*/
|
|
8163
8238
|
|
|
8164
8239
|
|
|
8165
|
-
var addDimsForLayer = function addDimsForLayer(
|
|
8240
|
+
var addDimsForLayer = function addDimsForLayer(layerProps, layer, layerDimNamesToRemove) {
|
|
8166
8241
|
/* Information from the WMS GetCapabilities document */
|
|
8167
|
-
var layerDims =
|
|
8168
|
-
var layerDimExtents = toArray(layerObjectFromWMS.Extent);
|
|
8242
|
+
var layerDims = layerProps.dimensions || [];
|
|
8169
8243
|
/* Loop through all the dims from the WMS GetCapabilities document for this layer */
|
|
8170
8244
|
|
|
8171
8245
|
var _loop = function _loop(d) {
|
|
8172
8246
|
/* Obtain layerDim info from the GetCapabilities document and put into a WMSLayerDimInfo object */
|
|
8173
|
-
var
|
|
8247
|
+
var dimName = (layerDims[d].name || '').toLowerCase();
|
|
8174
8248
|
var layerDim = {
|
|
8175
|
-
name:
|
|
8176
|
-
units:
|
|
8177
|
-
unitSymbol:
|
|
8178
|
-
value: layerDims[d].
|
|
8179
|
-
"default":
|
|
8180
|
-
isRefTimeDimension:
|
|
8249
|
+
name: dimName,
|
|
8250
|
+
units: layerDims[d].units || '',
|
|
8251
|
+
unitSymbol: layerDims[d].unitSymbol || '',
|
|
8252
|
+
value: layerDims[d].values || '',
|
|
8253
|
+
"default": layerDims[d].currentValue,
|
|
8254
|
+
isRefTimeDimension: dimName === 'reference_time'
|
|
8181
8255
|
};
|
|
8182
|
-
/* Add information to WMSLayerDimInfo from Extent elements: WMS 1.1.1 */
|
|
8183
|
-
|
|
8184
|
-
for (var i = 0; i < layerDimExtents.length; i += 1) {
|
|
8185
|
-
if (layerDimExtents[i].attr.name.toLowerCase() === layerDim.name) {
|
|
8186
|
-
/* Check if a value in the WMS Extent is given: */
|
|
8187
|
-
if (layerDimExtents[i].value) {
|
|
8188
|
-
layerDim.value = layerDimExtents[i].value.trim();
|
|
8189
|
-
}
|
|
8190
|
-
/* Check for default in the WMS Extent */
|
|
8191
|
-
|
|
8192
|
-
|
|
8193
|
-
if (layerDimExtents[i].attr["default"]) {
|
|
8194
|
-
layerDim["default"] = layerDimExtents[i].attr["default"].trim();
|
|
8195
|
-
}
|
|
8196
|
-
}
|
|
8197
|
-
}
|
|
8198
|
-
/* Graceful WMS check: Check if value is set, if not base it on the default */
|
|
8199
|
-
|
|
8200
|
-
|
|
8201
|
-
if (!layerDim.value && layerDim["default"]) {
|
|
8202
|
-
layerDim.value = layerDim["default"];
|
|
8203
|
-
}
|
|
8204
|
-
/* Graceful WMS check: Check if default is set, if not base it on the value */
|
|
8205
|
-
|
|
8206
|
-
|
|
8207
|
-
if (!layerDim["default"] && layerDim.value) {
|
|
8208
|
-
/* If it is not set, take either the last value in case start/stop/res is defined, otherwise the first */
|
|
8209
|
-
var s = layerDim.value.split('/');
|
|
8210
|
-
var defaultIndex = 0;
|
|
8211
|
-
if (s.length > 1) defaultIndex = 1;else if (s.length > 0) defaultIndex = 0;
|
|
8212
|
-
layerDim["default"] = s[defaultIndex];
|
|
8213
|
-
}
|
|
8214
8256
|
/* Flag that this dim should not be removed from the layer */
|
|
8215
8257
|
|
|
8216
|
-
|
|
8217
8258
|
layerDimNamesToRemove["delete"](layerDim.name);
|
|
8218
8259
|
/* Now configure the dimensions in the Layer based on the obtained info */
|
|
8219
8260
|
|
|
@@ -8268,20 +8309,11 @@ var addDimsForLayer = function addDimsForLayer(layerObjectFromWMS, layer, layerD
|
|
|
8268
8309
|
* @param wmLayer The WMLayer object to configure
|
|
8269
8310
|
*/
|
|
8270
8311
|
|
|
8271
|
-
var configureStyles = function configureStyles(
|
|
8272
|
-
|
|
8273
|
-
|
|
8274
|
-
for (var o = 0; o < nestedLayerPath.length; o += 1) {
|
|
8275
|
-
var _wmLayer$styles;
|
|
8276
|
-
|
|
8277
|
-
// eslint-disable-next-line no-param-reassign
|
|
8278
|
-
(_wmLayer$styles = wmLayer.styles).push.apply(_wmLayer$styles, _toConsumableArray(addStylesForLayer(nestedLayerPath[o])));
|
|
8279
|
-
} // eslint-disable-next-line no-empty
|
|
8280
|
-
|
|
8281
|
-
} catch (_a) {}
|
|
8312
|
+
var configureStyles = function configureStyles(layerProps, wmLayer) {
|
|
8313
|
+
// eslint-disable-next-line no-param-reassign
|
|
8314
|
+
wmLayer.styles = layerProps.styles || [];
|
|
8282
8315
|
/* Set the default style */
|
|
8283
8316
|
|
|
8284
|
-
|
|
8285
8317
|
if (wmLayer.styles.length > 0) {
|
|
8286
8318
|
/* Check if the current style is in the list */
|
|
8287
8319
|
var styleIndex = wmLayer.styles.findIndex(function (style) {
|
|
@@ -8303,7 +8335,7 @@ var configureStyles = function configureStyles(nestedLayerPath, wmLayer) {
|
|
|
8303
8335
|
* @param wmLayer The WMLayer object to configure
|
|
8304
8336
|
*/
|
|
8305
8337
|
|
|
8306
|
-
var configureDimensions = function configureDimensions(
|
|
8338
|
+
var configureDimensions = function configureDimensions(layerProps, wmLayer) {
|
|
8307
8339
|
/*
|
|
8308
8340
|
WMS 1.1.1:
|
|
8309
8341
|
<Dimension name="time" units="ISO8601"/>
|
|
@@ -8321,12 +8353,9 @@ var configureDimensions = function configureDimensions(nestedLayerPath, wmLayer)
|
|
|
8321
8353
|
/* Now start adding all dimensions starting with the parent layer. Layers more deeply nested will inherit Dimension info */
|
|
8322
8354
|
|
|
8323
8355
|
|
|
8324
|
-
|
|
8325
|
-
addDimsForLayer(nestedLayerPath[o], wmLayer, layerDimNamesToRemove);
|
|
8326
|
-
}
|
|
8356
|
+
addDimsForLayer(layerProps, wmLayer, layerDimNamesToRemove);
|
|
8327
8357
|
/* The list with dimensions to remove is now complete, remove the unneeded dimensions from the layer */
|
|
8328
8358
|
|
|
8329
|
-
|
|
8330
8359
|
layerDimNamesToRemove.forEach(function (dimName) {
|
|
8331
8360
|
var dimIndex = wmLayer.dimensions.findIndex(function (dim) {
|
|
8332
8361
|
return dim.name === dimName;
|
|
@@ -8348,6 +8377,14 @@ var configureDimensions = function configureDimensions(nestedLayerPath, wmLayer)
|
|
|
8348
8377
|
wmLayer.parentMap.configureMapDimensions(wmLayer);
|
|
8349
8378
|
}
|
|
8350
8379
|
};
|
|
8380
|
+
var configureGeographicBoundingBox = function configureGeographicBoundingBox(layerProps, wmLayer) {
|
|
8381
|
+
var bbox = layerProps.geographicBoundingBox;
|
|
8382
|
+
|
|
8383
|
+
if (bbox) {
|
|
8384
|
+
// eslint-disable-next-line no-param-reassign
|
|
8385
|
+
wmLayer.geographicBoundingBox = bbox;
|
|
8386
|
+
}
|
|
8387
|
+
};
|
|
8351
8388
|
|
|
8352
8389
|
var WMLayer = /*#__PURE__*/function () {
|
|
8353
8390
|
function WMLayer(options) {
|
|
@@ -8371,10 +8408,6 @@ var WMLayer = /*#__PURE__*/function () {
|
|
|
8371
8408
|
this.parseLayerPromise = this.parseLayerPromise.bind(this);
|
|
8372
8409
|
this.cloneLayer = this.cloneLayer.bind(this);
|
|
8373
8410
|
this.setName = this.setName.bind(this);
|
|
8374
|
-
this.getLayerRelative = this.getLayerRelative.bind(this);
|
|
8375
|
-
this.autoSelectLayer = this.autoSelectLayer.bind(this);
|
|
8376
|
-
this.getNextLayer = this.getNextLayer.bind(this);
|
|
8377
|
-
this.getPreviousLayer = this.getPreviousLayer.bind(this);
|
|
8378
8411
|
this.setStyle = this.setStyle.bind(this);
|
|
8379
8412
|
this.getStyles = this.getStyles.bind(this);
|
|
8380
8413
|
this.getStyleObject = this.getStyleObject.bind(this);
|
|
@@ -8740,162 +8773,67 @@ var WMLayer = /*#__PURE__*/function () {
|
|
|
8740
8773
|
|
|
8741
8774
|
this.title = this.name;
|
|
8742
8775
|
this["abstract"] = '';
|
|
8743
|
-
this.path = '';
|
|
8744
|
-
var foundLayer = 0; // Function will be called when the layer with the right name is found in the getcap doc
|
|
8745
|
-
|
|
8746
|
-
var foundLayerFunction = function foundLayerFunction(jsonlayer, path, nestedLayerPath) {
|
|
8747
|
-
_this3.title = jsonlayer.Title.value;
|
|
8748
|
-
|
|
8749
|
-
try {
|
|
8750
|
-
_this3["abstract"] = jsonlayer.Abstract.value;
|
|
8751
|
-
} catch (e) {
|
|
8752
|
-
_this3["abstract"] = I18n.not_available_message.text;
|
|
8753
|
-
}
|
|
8776
|
+
this.path = ''; // Function will be called when the layer with the right name is found in the getcap doc
|
|
8754
8777
|
|
|
8755
|
-
|
|
8778
|
+
var populateLayerFromTreeElement = function populateLayerFromTreeElement(jsonlayer) {
|
|
8779
|
+
_this3.title = jsonlayer.title || jsonlayer.name || '';
|
|
8780
|
+
_this3["abstract"] = jsonlayer["abstract"] || I18n.not_available_message.text;
|
|
8781
|
+
_this3.path = jsonlayer.path.join('/');
|
|
8756
8782
|
/** ***************** Go through styles **************** */
|
|
8757
8783
|
|
|
8758
|
-
configureStyles(
|
|
8784
|
+
configureStyles(jsonlayer, _this3);
|
|
8759
8785
|
/** ***************** Go through Dimensions **************** */
|
|
8760
8786
|
|
|
8761
|
-
configureDimensions(
|
|
8762
|
-
|
|
8763
|
-
|
|
8764
|
-
if (isDefined(jsonlayer.CRS)) {
|
|
8765
|
-
gp = toArray(jsonlayer.CRS);
|
|
8766
|
-
}
|
|
8767
|
-
|
|
8768
|
-
var tempSRS = [];
|
|
8787
|
+
configureDimensions(jsonlayer, _this3);
|
|
8788
|
+
/** ***************** Go through geographicBoundingBox **************** */
|
|
8769
8789
|
|
|
8770
|
-
|
|
8771
|
-
|
|
8772
|
-
// Fill in SRS and BBOX on basis of BoundingBox attribute
|
|
8773
|
-
var gpbbox = toArray(data.BoundingBox);
|
|
8790
|
+
configureGeographicBoundingBox(jsonlayer, _this3);
|
|
8791
|
+
_this3.queryable = jsonlayer.queryable || false;
|
|
8774
8792
|
|
|
8775
|
-
|
|
8776
|
-
|
|
8777
|
-
|
|
8793
|
+
if (jsonlayer.crs) {
|
|
8794
|
+
jsonlayer.crs.forEach(function (p) {
|
|
8795
|
+
var wmProjection = new WMProjection();
|
|
8796
|
+
wmProjection.srs = p.name || '';
|
|
8778
8797
|
|
|
8779
|
-
|
|
8780
|
-
|
|
8781
|
-
}
|
|
8798
|
+
if (p.bbox) {
|
|
8799
|
+
var swapBBOX = _this3.version === WMSVersion.version130 && wmProjection.srs === 'EPSG:4326' && _this3.wms130bboxcompatibilitymode === false;
|
|
8782
8800
|
|
|
8783
|
-
if (
|
|
8784
|
-
|
|
8785
|
-
|
|
8786
|
-
|
|
8787
|
-
}
|
|
8788
|
-
|
|
8789
|
-
var alreadyAdded = false;
|
|
8790
|
-
|
|
8791
|
-
for (var i = 0; i < _this3.projectionProperties.length; i += 1) {
|
|
8792
|
-
if (srs === _this3.projectionProperties[i].srs) {
|
|
8793
|
-
alreadyAdded = true;
|
|
8794
|
-
break;
|
|
8795
|
-
}
|
|
8796
|
-
}
|
|
8797
|
-
|
|
8798
|
-
if (alreadyAdded === false) {
|
|
8799
|
-
var geoProperty = new WMProjection();
|
|
8800
|
-
geoProperty.srs = srs;
|
|
8801
|
-
var swapBBOX = false;
|
|
8802
|
-
|
|
8803
|
-
if (_this3.version === WMSVersion.version130) {
|
|
8804
|
-
if (geoProperty.srs === 'EPSG:4326' && _this3.wms130bboxcompatibilitymode === false) {
|
|
8805
|
-
swapBBOX = true;
|
|
8806
|
-
}
|
|
8807
|
-
}
|
|
8808
|
-
|
|
8809
|
-
if (swapBBOX === false) {
|
|
8810
|
-
geoProperty.bbox.left = parseFloat(gpbbox[j].attr.minx);
|
|
8811
|
-
geoProperty.bbox.bottom = parseFloat(gpbbox[j].attr.miny);
|
|
8812
|
-
geoProperty.bbox.right = parseFloat(gpbbox[j].attr.maxx);
|
|
8813
|
-
geoProperty.bbox.top = parseFloat(gpbbox[j].attr.maxy);
|
|
8814
|
-
} else {
|
|
8815
|
-
geoProperty.bbox.left = parseFloat(gpbbox[j].attr.miny);
|
|
8816
|
-
geoProperty.bbox.bottom = parseFloat(gpbbox[j].attr.minx);
|
|
8817
|
-
geoProperty.bbox.right = parseFloat(gpbbox[j].attr.maxy);
|
|
8818
|
-
geoProperty.bbox.top = parseFloat(gpbbox[j].attr.maxx);
|
|
8819
|
-
}
|
|
8820
|
-
|
|
8821
|
-
_this3.projectionProperties.push(geoProperty);
|
|
8822
|
-
|
|
8823
|
-
tempSRS.push(geoProperty.srs);
|
|
8801
|
+
if (swapBBOX) {
|
|
8802
|
+
wmProjection.bbox.setBBOX(p.bbox.bottom, p.bbox.left, p.bbox.top, p.bbox.right);
|
|
8803
|
+
} else {
|
|
8804
|
+
wmProjection.bbox.setBBOX(p.bbox.left, p.bbox.bottom, p.bbox.right, p.bbox.top);
|
|
8824
8805
|
}
|
|
8825
8806
|
}
|
|
8826
|
-
}
|
|
8827
|
-
};
|
|
8828
|
-
|
|
8829
|
-
getgpbbox(jsonlayer);
|
|
8830
|
-
getgpbbox(rootLayer); // Fill in SRS on basis of SRS attribute
|
|
8831
|
-
|
|
8832
|
-
for (var j = 0; j < gp.length; j += 1) {
|
|
8833
|
-
if (tempSRS.indexOf(gp[j].value) === -1) {
|
|
8834
|
-
var geoProperty = new WMProjection();
|
|
8835
|
-
debug(DebugType.Error, "Warning: BoundingBOX missing for SRS ".concat(gp[j].value));
|
|
8836
|
-
geoProperty.bbox.left = -180;
|
|
8837
|
-
geoProperty.bbox.bottom = -90;
|
|
8838
|
-
geoProperty.bbox.right = 180;
|
|
8839
|
-
geoProperty.bbox.top = 90;
|
|
8840
|
-
geoProperty.srs = gp[j].value;
|
|
8841
8807
|
|
|
8842
|
-
_this3.projectionProperties.push(
|
|
8843
|
-
}
|
|
8844
|
-
}
|
|
8845
|
-
|
|
8846
|
-
tempSRS = [];
|
|
8847
|
-
/* Check if layer is queryable */
|
|
8848
|
-
|
|
8849
|
-
_this3.queryable = false;
|
|
8850
|
-
|
|
8851
|
-
try {
|
|
8852
|
-
if (parseInt(jsonlayer.attr.queryable, 10) === 1) _this3.queryable = true;else _this3.queryable = false;
|
|
8853
|
-
} catch (e) {
|
|
8854
|
-
debug(DebugType.Error, "Unable to detect whether this layer is queryable (for layer ".concat(_this3.title, ")"));
|
|
8808
|
+
_this3.projectionProperties.push(wmProjection);
|
|
8809
|
+
});
|
|
8855
8810
|
}
|
|
8856
|
-
|
|
8857
|
-
foundLayer = 1;
|
|
8858
8811
|
};
|
|
8859
8812
|
|
|
8860
|
-
|
|
8861
|
-
|
|
8862
|
-
var _nestedLayerPath = [];
|
|
8863
|
-
|
|
8864
|
-
for (var i = 0; i < _prevNestedLayerPath.length; i += 1) {
|
|
8865
|
-
_nestedLayerPath.push(_prevNestedLayerPath[i]);
|
|
8866
|
-
}
|
|
8867
|
-
|
|
8868
|
-
_nestedLayerPath.push(JSONLayers[k]);
|
|
8813
|
+
var layerTreeStructure = buildLayerTreeFromNestedWMSLayer(rootLayer);
|
|
8814
|
+
/* Recursively walk the layertree until a child is found with the corresponding name */
|
|
8869
8815
|
|
|
8870
|
-
|
|
8871
|
-
|
|
8872
|
-
|
|
8873
|
-
|
|
8874
|
-
pathnew += "".concat(JSONLayers[k].Title.value, "/");
|
|
8875
|
-
} catch (e) {
|
|
8876
|
-
/* Do nothing */
|
|
8877
|
-
}
|
|
8816
|
+
var findTreeNode = function findTreeNode(tree) {
|
|
8817
|
+
if (tree.name === _this3.name) {
|
|
8818
|
+
return tree;
|
|
8819
|
+
}
|
|
8878
8820
|
|
|
8879
|
-
|
|
8880
|
-
|
|
8881
|
-
|
|
8882
|
-
|
|
8883
|
-
|
|
8884
|
-
|
|
8885
|
-
|
|
8821
|
+
if (tree.children) {
|
|
8822
|
+
var foundChild;
|
|
8823
|
+
tree.children.find(function (node) {
|
|
8824
|
+
foundChild = findTreeNode(node);
|
|
8825
|
+
return foundChild;
|
|
8826
|
+
});
|
|
8827
|
+
return foundChild;
|
|
8886
8828
|
}
|
|
8887
8829
|
|
|
8888
8830
|
return undefined;
|
|
8889
|
-
}
|
|
8890
|
-
|
|
8831
|
+
};
|
|
8891
8832
|
|
|
8892
|
-
var
|
|
8893
|
-
var path = '';
|
|
8894
|
-
var nestedLayerPath = [rootLayer];
|
|
8895
|
-
recursivelyFindLayer(this, JSONLayers, path, nestedLayerPath);
|
|
8833
|
+
var foundLayer = findTreeNode(layerTreeStructure);
|
|
8896
8834
|
|
|
8897
|
-
if (foundLayer
|
|
8898
|
-
|
|
8835
|
+
if (!foundLayer) {
|
|
8836
|
+
/* Layer was not found... */
|
|
8899
8837
|
var message = '';
|
|
8900
8838
|
|
|
8901
8839
|
if (this.name) {
|
|
@@ -8912,6 +8850,8 @@ var WMLayer = /*#__PURE__*/function () {
|
|
|
8912
8850
|
/* Layer was found */
|
|
8913
8851
|
|
|
8914
8852
|
|
|
8853
|
+
populateLayerFromTreeElement(foundLayer);
|
|
8854
|
+
|
|
8915
8855
|
if (this.onReady) {
|
|
8916
8856
|
this.onReady(this);
|
|
8917
8857
|
}
|
|
@@ -9021,71 +8961,6 @@ var WMLayer = /*#__PURE__*/function () {
|
|
|
9021
8961
|
this.name = name;
|
|
9022
8962
|
return this.parseLayerPromise(false);
|
|
9023
8963
|
}
|
|
9024
|
-
}, {
|
|
9025
|
-
key: "getLayerRelative",
|
|
9026
|
-
value: function getLayerRelative(success, failure, prevNext) {
|
|
9027
|
-
var _this6 = this;
|
|
9028
|
-
|
|
9029
|
-
var localPrevNext = prevNext;
|
|
9030
|
-
|
|
9031
|
-
if (!isDefined(prevNext)) {
|
|
9032
|
-
localPrevNext = 0;
|
|
9033
|
-
}
|
|
9034
|
-
|
|
9035
|
-
var getLayerObjectsFinished = function getLayerObjectsFinished(layerObjects) {
|
|
9036
|
-
var currentLayerIndex = -1;
|
|
9037
|
-
|
|
9038
|
-
for (var j = 0; j < layerObjects.length; j += 1) {
|
|
9039
|
-
if (layerObjects[j].name === _this6.name) {
|
|
9040
|
-
currentLayerIndex = j;
|
|
9041
|
-
break;
|
|
9042
|
-
}
|
|
9043
|
-
}
|
|
9044
|
-
|
|
9045
|
-
if (currentLayerIndex === -1) {
|
|
9046
|
-
failure("Current layer [".concat(_this6.name, "] not in this service"));
|
|
9047
|
-
return;
|
|
9048
|
-
}
|
|
9049
|
-
|
|
9050
|
-
if (localPrevNext === -1) currentLayerIndex -= 1;
|
|
9051
|
-
if (localPrevNext === 1) currentLayerIndex += 1;
|
|
9052
|
-
if (currentLayerIndex > layerObjects.length - 1) currentLayerIndex = 0;
|
|
9053
|
-
if (currentLayerIndex < 0) currentLayerIndex = layerObjects.length - 1;
|
|
9054
|
-
success(layerObjects[currentLayerIndex], currentLayerIndex, layerObjects.length);
|
|
9055
|
-
};
|
|
9056
|
-
|
|
9057
|
-
var wmjsService = WMGetServiceFromStore(this.service);
|
|
9058
|
-
wmjsService.getLayerObjectsFlat(getLayerObjectsFinished, failure, undefined);
|
|
9059
|
-
}
|
|
9060
|
-
}, {
|
|
9061
|
-
key: "autoSelectLayer",
|
|
9062
|
-
value: function autoSelectLayer(success, failure) {
|
|
9063
|
-
var getLayerObjectsFinished = function getLayerObjectsFinished(layerObjects) {
|
|
9064
|
-
for (var j = 0; j < layerObjects.length; j += 1) {
|
|
9065
|
-
if (isDefined(layerObjects[j].name)) {
|
|
9066
|
-
if (layerObjects[j].name.indexOf('baselayer') === -1) {
|
|
9067
|
-
if (layerObjects[j].path.indexOf('baselayer') === -1) {
|
|
9068
|
-
success(layerObjects[j]);
|
|
9069
|
-
return;
|
|
9070
|
-
}
|
|
9071
|
-
}
|
|
9072
|
-
}
|
|
9073
|
-
}
|
|
9074
|
-
};
|
|
9075
|
-
|
|
9076
|
-
var wmjsService = WMGetServiceFromStore(this.service);
|
|
9077
|
-
wmjsService.getLayerObjectsFlat(getLayerObjectsFinished, failure, undefined);
|
|
9078
|
-
}
|
|
9079
|
-
}, {
|
|
9080
|
-
key: "getNextLayer",
|
|
9081
|
-
value: function getNextLayer(success, failure) {
|
|
9082
|
-
this.getLayerRelative(success, failure, 1);
|
|
9083
|
-
}
|
|
9084
|
-
}, {
|
|
9085
|
-
key: "getPreviousLayer",
|
|
9086
|
-
value: function getPreviousLayer(success, failure) {
|
|
9087
|
-
this.getLayerRelative(success, failure, -1);
|
|
9088
|
-
}
|
|
9089
8964
|
/**
|
|
9090
8965
|
* Sets the style by its name
|
|
9091
8966
|
* @param style: The name of the style (not the object)
|