@vtx/ol-map 1.0.99 → 1.0.101

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.
Binary file
@@ -8,20 +8,27 @@ var _layer = require("ol/layer");
8
8
  var _ol = require("ol");
9
9
  var _source = require("ol/source");
10
10
  var _renderer = _interopRequireDefault(require("../renderer"));
11
- var _style3 = require("ol/style");
11
+ var _style5 = require("ol/style");
12
12
  var _isFunction = _interopRequireDefault(require("../_util/isFunction"));
13
13
  var _createFeatureCollection = require("./createFeatureCollection");
14
14
  var _isObject = _interopRequireDefault(require("../_util/isObject"));
15
15
  var _encryptParams = _interopRequireDefault(require("../_util/encryptParams"));
16
- var _excluded = ["url", "params", "data", "dataField", "features", "sourceOptions", "key", "name", "label", "labelField", "point", "cluster", "template", "autoRefresh", "method", "layerControl", "show", "style", "group", "iconOptions", "afterGetData", "legend", "viewOnly", "encrypt", "valueField", "map", "tipTemplate"];
16
+ var _MyCluster = _interopRequireDefault(require("./MyCluster"));
17
+ var _excluded = ["url", "params", "data", "dataField", "features", "sourceOptions", "key", "name", "label", "labelField", "point", "cluster", "template", "autoRefresh", "method", "layerControl", "show", "style", "group", "iconOptions", "afterGetData", "legend", "viewOnly", "encrypt", "valueField", "map", "tipTemplate"],
18
+ _excluded2 = ["color", "background", "backgroundStroke", "backgroundStrokeWidth"],
19
+ _excluded3 = ["numberStyle", "iconOptions"];
17
20
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
18
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
19
21
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
20
22
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
21
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
22
23
  function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
23
24
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
25
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
26
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
27
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
28
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
24
29
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
30
+ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
31
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
25
32
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
26
33
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
27
34
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
@@ -46,37 +53,37 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
46
53
  var FeatureLayer = /*#__PURE__*/function (_Vector) {
47
54
  _inherits(FeatureLayer, _Vector);
48
55
  var _super = _createSuper(FeatureLayer);
49
- function FeatureLayer(options) {
56
+ function FeatureLayer(_options) {
50
57
  var _thisSuper, _this2;
51
58
  _classCallCheck(this, FeatureLayer);
52
- var url = options.url,
53
- params = options.params,
54
- data = options.data,
55
- dataField = options.dataField,
56
- features = options.features,
57
- sourceOptions = options.sourceOptions,
58
- key = options.key,
59
- name = options.name,
60
- label = options.label,
61
- _labelField = options.labelField,
62
- point = options.point,
63
- cluster = options.cluster,
64
- template = options.template,
65
- autoRefresh = options.autoRefresh,
66
- method = options.method,
67
- layerControl = options.layerControl,
68
- show = options.show,
69
- style = options.style,
70
- group = options.group,
71
- iconOptions = options.iconOptions,
72
- afterGetData = options.afterGetData,
73
- legend = options.legend,
74
- viewOnly = options.viewOnly,
75
- encrypt = options.encrypt,
76
- valueField = options.valueField,
77
- map = options.map,
78
- tipTemplate = options.tipTemplate,
79
- other = _objectWithoutProperties(options, _excluded);
59
+ var url = _options.url,
60
+ params = _options.params,
61
+ data = _options.data,
62
+ dataField = _options.dataField,
63
+ features = _options.features,
64
+ sourceOptions = _options.sourceOptions,
65
+ key = _options.key,
66
+ name = _options.name,
67
+ label = _options.label,
68
+ _labelField = _options.labelField,
69
+ point = _options.point,
70
+ cluster = _options.cluster,
71
+ template = _options.template,
72
+ autoRefresh = _options.autoRefresh,
73
+ method = _options.method,
74
+ layerControl = _options.layerControl,
75
+ show = _options.show,
76
+ _style2 = _options.style,
77
+ group = _options.group,
78
+ iconOptions = _options.iconOptions,
79
+ afterGetData = _options.afterGetData,
80
+ legend = _options.legend,
81
+ viewOnly = _options.viewOnly,
82
+ encrypt = _options.encrypt,
83
+ valueField = _options.valueField,
84
+ map = _options.map,
85
+ tipTemplate = _options.tipTemplate,
86
+ other = _objectWithoutProperties(_options, _excluded);
80
87
  var props = _objectSpread({}, other);
81
88
  props.source = props.source || new _source.Vector(_objectSpread({
82
89
  features: features
@@ -89,16 +96,32 @@ var FeatureLayer = /*#__PURE__*/function (_Vector) {
89
96
  if (f.show) {
90
97
  defaultShow = true;
91
98
  }
99
+
100
+ // 将字符函数转化为可执行的函数
101
+ if (f.filter && typeof f.filter === 'string' && f.filter.indexOf('=>') !== -1) {
102
+ f.filter = f.filter.replaceAll(' ', '');
103
+ var _f$filter$split = f.filter.split('=>'),
104
+ _f$filter$split2 = _slicedToArray(_f$filter$split, 2),
105
+ a = _f$filter$split2[0],
106
+ c = _f$filter$split2[1];
107
+ f.filter = new Function(a, "return ".concat(c));
108
+ }
92
109
  });
93
110
  }
94
111
  }
95
112
  _this2 = _super.call(this, props);
96
- _defineProperty(_assertThisInitialized(_this2), "getClusterTextStyle", function (size) {
97
- return new _style3.Text({
113
+ _defineProperty(_assertThisInitialized(_this2), "getClusterTextStyle", function (size, options) {
114
+ var _ref = options && _typeof(options) === 'object' ? options : {},
115
+ color = _ref.color,
116
+ background = _ref.background,
117
+ backgroundStroke = _ref.backgroundStroke,
118
+ backgroundStrokeWidth = _ref.backgroundStrokeWidth,
119
+ otherVal = _objectWithoutProperties(_ref, _excluded2);
120
+ var style = _objectSpread({
98
121
  text: String(size),
99
122
  font: '18px Calibri,sans-serif',
100
- fill: new _style3.Fill({
101
- color: '#fff'
123
+ fill: new _style5.Fill({
124
+ color: color || '#fff'
102
125
  }),
103
126
  padding: [0, 0, 0, 0],
104
127
  justify: 'center',
@@ -106,7 +129,19 @@ var FeatureLayer = /*#__PURE__*/function (_Vector) {
106
129
  textBaseline: 'middle',
107
130
  offsetY: -22,
108
131
  offsetX: 16
109
- });
132
+ }, otherVal);
133
+ if (background) {
134
+ style.backgroundFill = new _style5.Fill({
135
+ color: background
136
+ });
137
+ }
138
+ if (backgroundStroke) {
139
+ style.backgroundStroke = new _style5.Stroke({
140
+ color: '#FFFFFF',
141
+ width: backgroundStrokeWidth || 2
142
+ });
143
+ }
144
+ return new _style5.Text(style);
110
145
  });
111
146
  _defineProperty(_assertThisInitialized(_this2), "getLabelStyle", function (feature, color) {
112
147
  var labelField = _this2._options.labelField;
@@ -120,16 +155,16 @@ var FeatureLayer = /*#__PURE__*/function (_Vector) {
120
155
  }
121
156
  }
122
157
  if (labelField) {
123
- return new _style3.Text({
158
+ return new _style5.Text({
124
159
  text: feature.values_[labelField] || '-',
125
160
  font: '12px Calibri,sans-serif',
126
- fill: new _style3.Fill({
161
+ fill: new _style5.Fill({
127
162
  color: color
128
163
  }),
129
- backgroundFill: new _style3.Fill({
164
+ backgroundFill: new _style5.Fill({
130
165
  color: '#fff'
131
166
  }),
132
- backgroundStroke: new _style3.Stroke({
167
+ backgroundStroke: new _style5.Stroke({
133
168
  color: color,
134
169
  width: 1
135
170
  }),
@@ -142,7 +177,7 @@ var FeatureLayer = /*#__PURE__*/function (_Vector) {
142
177
  });
143
178
  _set((_thisSuper = _assertThisInitialized(_this2), _getPrototypeOf(FeatureLayer.prototype)), "show", show, _thisSuper, true);
144
179
  // 参数
145
- _this2._options = options;
180
+ _this2._options = _options;
146
181
 
147
182
  // 地图
148
183
  _this2.map = map;
@@ -199,7 +234,7 @@ var FeatureLayer = /*#__PURE__*/function (_Vector) {
199
234
  _this2.legend = legend;
200
235
 
201
236
  // 样式
202
- _this2.style = style;
237
+ _this2.style = _style2;
203
238
 
204
239
  // 数据
205
240
  _this2.data = data;
@@ -327,7 +362,7 @@ var FeatureLayer = /*#__PURE__*/function (_Vector) {
327
362
  if (typeof style === 'string' || (0, _isFunction["default"])(style) && cluster) {
328
363
  styles.push(new _renderer["default"].Marker(_objectSpread({}, _this3.getMarkerOptions(feature, style))));
329
364
  return styles;
330
- } else if (style instanceof _style3.Style) {
365
+ } else if (style instanceof _style5.Style) {
331
366
  // 判断是否为 ol Style
332
367
  styles.push(style);
333
368
  return styles;
@@ -343,56 +378,56 @@ var FeatureLayer = /*#__PURE__*/function (_Vector) {
343
378
  styles.push(_style);
344
379
  return styles;
345
380
  } else if ((0, _isObject["default"])(style)) {
346
- var _style2 = style,
347
- mode = _style2.mode;
381
+ var _style3 = style,
382
+ mode = _style3.mode;
348
383
  if (mode) {
349
384
  if (mode === 'Simple') {
350
- var _options = _this3.getSimpleStyle(feature, style.render);
351
- styles.push(_renderer["default"].Simple(_options));
385
+ var _options2 = _this3.getSimpleStyle(feature, style.render);
386
+ styles.push(_renderer["default"].Simple(_options2));
352
387
  return styles;
353
388
  }
354
389
  if (mode === 'UniqueValue') {
355
390
  var _feature$get2;
356
391
  var size = ((_feature$get2 = feature.get('features')) === null || _feature$get2 === void 0 ? void 0 : _feature$get2.length) || 0;
357
392
  if (size > 1) {
358
- var _options2 = _this3.getSimpleStyle(feature, style.render.render[0]);
359
- styles.push(_renderer["default"].Simple(_options2));
393
+ var _options3 = _this3.getSimpleStyle(feature, style.render.render[0]);
394
+ styles.push(_renderer["default"].Simple(_options3));
360
395
  return styles;
361
396
  }
362
- var _options3 = _this3.getMultipleStyle(feature, style.render);
363
- styles.push(_renderer["default"].UniqueValue(feature, _options3));
397
+ var _options4 = _this3.getMultipleStyle(feature, style.render);
398
+ styles.push(_renderer["default"].UniqueValue(feature, _options4));
364
399
  return styles;
365
400
  }
366
401
  if (mode === 'ClassBreaks') {
367
402
  var _feature$get3;
368
403
  var _size = ((_feature$get3 = feature.get('features')) === null || _feature$get3 === void 0 ? void 0 : _feature$get3.length) || 0;
369
404
  if (_size > 1) {
370
- var _options4 = _this3.getSimpleStyle(feature, style.render.render[0]);
371
- styles.push(_renderer["default"].Simple(_options4));
405
+ var _options5 = _this3.getSimpleStyle(feature, style.render.render[0]);
406
+ styles.push(_renderer["default"].Simple(_options5));
372
407
  return styles;
373
408
  }
374
- var _options5 = _this3.getMultipleStyle(feature, style.render);
375
- styles.push(_renderer["default"].ClassBreaks(feature, _options5));
409
+ var _options6 = _this3.getMultipleStyle(feature, style.render);
410
+ styles.push(_renderer["default"].ClassBreaks(feature, _options6));
376
411
  return styles;
377
412
  }
378
413
  } else if (style.style) {
379
- var _options6 = _this3.getSimpleStyle(feature, style);
380
- styles.push(_renderer["default"].Simple(_options6));
414
+ var _options7 = _this3.getSimpleStyle(feature, style);
415
+ styles.push(_renderer["default"].Simple(_options7));
381
416
  return styles;
382
417
  }
383
418
  }
384
419
  }
385
- styles.push(new _style3.Style({
386
- image: new _style3.Circle({
420
+ styles.push(new _style5.Style({
421
+ image: new _style5.Circle({
387
422
  radius: 4,
388
- fill: new _style3.Fill({
423
+ fill: new _style5.Fill({
389
424
  color: 'rgba(0,155,255, 0.8)'
390
425
  })
391
426
  }),
392
- fill: new _style3.Fill({
427
+ fill: new _style5.Fill({
393
428
  color: 'rgba(255, 255, 255, 0.6)'
394
429
  }),
395
- stroke: new _style3.Stroke({
430
+ stroke: new _style5.Stroke({
396
431
  color: '#009BFF',
397
432
  width: 2
398
433
  })
@@ -512,25 +547,30 @@ var FeatureLayer = /*#__PURE__*/function (_Vector) {
512
547
  }, {
513
548
  key: "setClusterSource",
514
549
  value: function setClusterSource(cluster) {
515
- var _this$_features;
550
+ var _this$_features,
551
+ _this5 = this;
516
552
  var _this = this;
517
- var _ref = (0, _isObject["default"])(cluster) ? cluster : {
553
+ var _ref2 = (0, _isObject["default"])(cluster) ? cluster : {
518
554
  show: cluster
519
555
  },
520
- show = _ref.show,
521
- minDistance = _ref.minDistance,
522
- distance = _ref.distance;
556
+ show = _ref2.show,
557
+ minDistance = _ref2.minDistance,
558
+ distance = _ref2.distance,
559
+ group = _ref2.group;
523
560
  var source = new _source.Vector({
524
561
  features: (_this$_features = this._features) === null || _this$_features === void 0 ? void 0 : _this$_features.filter(function (v) {
525
562
  return !v.hasOwnProperty('show') || v.show;
526
563
  })
527
564
  });
528
565
  if (show) {
529
- var clusterSource = new _source.Cluster(_objectSpread({
566
+ group = group || this.group;
567
+ var clusterSource = new _MyCluster["default"](_objectSpread({
530
568
  distance: distance || 100,
531
569
  minDistance: minDistance || 50,
532
570
  source: source,
571
+ group: group,
533
572
  createCluster: function createCluster(point, features) {
573
+ var _group;
534
574
  var feature = new _ol.Feature({
535
575
  geometry: point,
536
576
  features: features.map(function (v) {
@@ -538,6 +578,41 @@ var FeatureLayer = /*#__PURE__*/function (_Vector) {
538
578
  return v;
539
579
  })
540
580
  });
581
+ if ((_group = group) !== null && _group !== void 0 && _group.length) {
582
+ var _group2;
583
+ var style;
584
+ var f = features[0];
585
+ var size = features.length;
586
+ (_group2 = group) === null || _group2 === void 0 ? void 0 : _group2.map(function (v) {
587
+ var _v$filter2;
588
+ if (v !== null && v !== void 0 && (_v$filter2 = v.filter) !== null && _v$filter2 !== void 0 && _v$filter2.call(v, f.values_)) {
589
+ style = v.style || style;
590
+ }
591
+ });
592
+ var markerStyle = _objectSpread({}, style.style);
593
+ if (size > 1) {
594
+ var _style4, _markerStyle2;
595
+ if ((_style4 = style) !== null && _style4 !== void 0 && _style4.clusterStyle) {
596
+ markerStyle = _objectSpread({}, style.clusterStyle);
597
+ }
598
+ var _markerStyle = markerStyle,
599
+ numberStyle = _markerStyle.numberStyle,
600
+ iconOptions = _markerStyle.iconOptions,
601
+ otherStyle = _objectWithoutProperties(_markerStyle, _excluded3);
602
+ markerStyle = _objectSpread(_objectSpread({}, otherStyle), {}, {
603
+ text: _this5.getClusterTextStyle((_markerStyle2 = markerStyle) !== null && _markerStyle2 !== void 0 && _markerStyle2.image ? size : ' ', numberStyle),
604
+ iconOptions: _objectSpread({
605
+ hideFooter: true,
606
+ info: {
607
+ text: size,
608
+ fontSize: 18
609
+ }
610
+ }, iconOptions || (cluster === null || cluster === void 0 ? void 0 : cluster.iconOptions) || {})
611
+ });
612
+ }
613
+ var _style = new _renderer["default"].Marker(markerStyle);
614
+ feature.setStyle(_style);
615
+ }
541
616
 
542
617
  // 增加聚合点位标识
543
618
  feature.isCluster = true;
@@ -555,7 +630,7 @@ var FeatureLayer = /*#__PURE__*/function (_Vector) {
555
630
  }, {
556
631
  key: "refresh",
557
632
  value: function refresh() {
558
- var _this5 = this;
633
+ var _this6 = this;
559
634
  (0, _createFeatureCollection.getDataByHttpByParams)({
560
635
  url: this.url,
561
636
  params: this.params,
@@ -565,10 +640,10 @@ var FeatureLayer = /*#__PURE__*/function (_Vector) {
565
640
  }).then(function (features) {
566
641
  if (features) {
567
642
  var new_features = features;
568
- _this5._features = new_features;
643
+ _this6._features = new_features;
569
644
  var newFeatures = [];
570
645
  new_features.map(function (v) {
571
- var f = _this5.getFeatureByFieldValue('id', v.values_.id);
646
+ var f = _this6.getFeatureByFieldValue('id', v.values_.id);
572
647
  if (f) {
573
648
  f.values_ = v.values_;
574
649
  } else {
@@ -576,9 +651,9 @@ var FeatureLayer = /*#__PURE__*/function (_Vector) {
576
651
  }
577
652
  });
578
653
  if (newFeatures.length) {
579
- _this5.getSource().addFeatures(newFeatures);
654
+ _this6.getSource().addFeatures(newFeatures);
580
655
  }
581
- _this5.getSource().changed();
656
+ _this6.getSource().changed();
582
657
  }
583
658
  });
584
659
  }
@@ -596,7 +671,7 @@ var FeatureLayer = /*#__PURE__*/function (_Vector) {
596
671
  }, {
597
672
  key: "loadUrlData",
598
673
  value: function loadUrlData(url, params, method) {
599
- var _this6 = this;
674
+ var _this7 = this;
600
675
  var afterGetData = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : this.afterGetData;
601
676
  this.getSource().clear();
602
677
  this._features = [];
@@ -611,11 +686,11 @@ var FeatureLayer = /*#__PURE__*/function (_Vector) {
611
686
  field: this.dataField
612
687
  }).then(function (features) {
613
688
  if (features !== null && features !== void 0 && features.length) {
614
- _this6._features = features;
615
- _this6.getSource().addFeatures(features);
689
+ _this7._features = features;
690
+ _this7.getSource().addFeatures(features);
616
691
  }
617
- if (_this6._options.cluster) {
618
- _this6.setClusterMode(_this6._options.cluster);
692
+ if (_this7._options.cluster) {
693
+ _this7.setClusterMode(_this7._options.cluster);
619
694
  }
620
695
  });
621
696
  }
@@ -644,16 +719,16 @@ var FeatureLayer = /*#__PURE__*/function (_Vector) {
644
719
  }
645
720
  }, {
646
721
  key: "getFeaturesByFieldValueOpera",
647
- value: function getFeaturesByFieldValueOpera(_ref2) {
648
- var _this7 = this;
649
- var field = _ref2.field,
650
- value = _ref2.value,
651
- _ref2$operation = _ref2.operation,
652
- operation = _ref2$operation === void 0 ? '===' : _ref2$operation,
653
- features = _ref2.features,
654
- filter = _ref2.filter;
722
+ value: function getFeaturesByFieldValueOpera(_ref3) {
723
+ var _this8 = this;
724
+ var field = _ref3.field,
725
+ value = _ref3.value,
726
+ _ref3$operation = _ref3.operation,
727
+ operation = _ref3$operation === void 0 ? '===' : _ref3$operation,
728
+ features = _ref3.features,
729
+ filter = _ref3.filter;
655
730
  return new Promise(function (resolve, reject) {
656
- var _features = features || _this7.getFeatures();
731
+ var _features = features || _this8.getFeatures();
657
732
  if (filter) {
658
733
  _features = _features.filter(function (feature) {
659
734
  return filter(feature.values_);
@@ -709,8 +784,8 @@ var FeatureLayer = /*#__PURE__*/function (_Vector) {
709
784
  this._features.map(function (feature) {
710
785
  var show = true;
711
786
  group.map(function (v) {
712
- var _v$filter2;
713
- if (v !== null && v !== void 0 && (_v$filter2 = v.filter) !== null && _v$filter2 !== void 0 && _v$filter2.call(v, feature.values_)) {
787
+ var _v$filter3;
788
+ if (v !== null && v !== void 0 && (_v$filter3 = v.filter) !== null && _v$filter3 !== void 0 && _v$filter3.call(v, feature.values_)) {
714
789
  if (v.hasOwnProperty('show') && !v.show) {
715
790
  show = false;
716
791
  }