@vtx/map 1.2.21 → 1.2.23

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.
@@ -241,7 +241,10 @@ var OlMap = /*#__PURE__*/function (_React$Component) {
241
241
  _this.olLayers = []; // ol图层集合 {address:'', layer: ''}
242
242
 
243
243
  _this.baseLayer = null; // 地图图层
244
- //是否绘制测距
244
+
245
+ _this.pointLayerZIndex = props.pointLayerZIndex || 7;
246
+ _this.polylineLayerZIndex = props.polylineLayerZIndex || 6;
247
+ _this.polygonLayerZIndex = props.polygonLayerZIndex || 5; //是否绘制测距
245
248
 
246
249
  _this.rangingTool = {
247
250
  isRanging: false,
@@ -2396,7 +2399,8 @@ var OlMap = /*#__PURE__*/function (_React$Component) {
2396
2399
  var pointLayer = new ol.layer.Vector({
2397
2400
  name: 'point',
2398
2401
  source: source,
2399
- id: item.id
2402
+ id: item.id,
2403
+ zIndex: t.pointLayerZIndex
2400
2404
  });
2401
2405
  t.pointLayers.push({
2402
2406
  id: item.id,
@@ -2801,7 +2805,8 @@ var OlMap = /*#__PURE__*/function (_React$Component) {
2801
2805
  var pointLayer = new ol.layer.Vector({
2802
2806
  name: 'point_layer',
2803
2807
  source: _source,
2804
- id: 'point_layer'
2808
+ id: 'point_layer',
2809
+ zIndex: t.pointLayerZIndex
2805
2810
  });
2806
2811
  t.state.gis.addLayer(pointLayer);
2807
2812
  t.pointFeatureLayer = pointLayer;
@@ -2877,7 +2882,8 @@ var OlMap = /*#__PURE__*/function (_React$Component) {
2877
2882
  var lineLayer = new ol.layer.Vector({
2878
2883
  name: 'polyline',
2879
2884
  id: item.id,
2880
- source: source
2885
+ source: source,
2886
+ zIndex: t.polylineLayerZIndex
2881
2887
  });
2882
2888
  t.state.gis.addLayer(lineLayer); //缓存图元的数据,便于后期操作
2883
2889
 
@@ -3039,7 +3045,8 @@ var OlMap = /*#__PURE__*/function (_React$Component) {
3039
3045
  var polygonLayer = new ol.layer.Vector({
3040
3046
  name: 'polygon',
3041
3047
  id: item.id,
3042
- source: source
3048
+ source: source,
3049
+ zIndex: t.polygonLayerZIndex
3043
3050
  });
3044
3051
  t.state.gis.addLayer(polygonLayer); //缓存图元的数据,便于后期操作
3045
3052
 
@@ -3198,7 +3205,8 @@ var OlMap = /*#__PURE__*/function (_React$Component) {
3198
3205
  var circleLayer = new ol.layer.Vector({
3199
3206
  name: 'circle',
3200
3207
  id: item.id,
3201
- source: source
3208
+ source: source,
3209
+ zIndex: t.polygonLayerZIndex
3202
3210
  });
3203
3211
  t.state.gis.addLayer(circleLayer);
3204
3212
  ccsids.push(item.id);
@@ -3637,7 +3645,8 @@ var OlMap = /*#__PURE__*/function (_React$Component) {
3637
3645
  } else {
3638
3646
  t.clusterInfo.clusterHulls = new ol.layer.Vector({
3639
3647
  source: t.clusterInfo.clusterSource,
3640
- style: clusterHullStyle
3648
+ style: clusterHullStyle,
3649
+ zIndex: t.polygonLayerZIndex
3641
3650
  });
3642
3651
  t.state.gis.addLayer(t.clusterInfo.clusterHulls);
3643
3652
  }
@@ -3647,7 +3656,8 @@ var OlMap = /*#__PURE__*/function (_React$Component) {
3647
3656
  } else {
3648
3657
  t.clusterInfo.clusters = new ol.layer.Vector({
3649
3658
  source: t.clusterInfo.clusterSource,
3650
- style: clusterStyle
3659
+ style: clusterStyle,
3660
+ zIndex: t.polygonLayerZIndex
3651
3661
  });
3652
3662
  t.state.gis.addLayer(t.clusterInfo.clusters);
3653
3663
  }
@@ -3657,7 +3667,8 @@ var OlMap = /*#__PURE__*/function (_React$Component) {
3657
3667
  } else {
3658
3668
  t.clusterInfo.clusterCircles = new ol.layer.Vector({
3659
3669
  source: t.clusterInfo.clusterSource,
3660
- style: clusterCircleStyle
3670
+ style: clusterCircleStyle,
3671
+ zIndex: t.polygonLayerZIndex
3661
3672
  });
3662
3673
  t.state.gis.addLayer(t.clusterInfo.clusterCircles);
3663
3674
  }