@antv/l7-layers 2.9.22-alpha.0 → 2.9.24

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.
Files changed (52) hide show
  1. package/es/Geometry/models/plane.d.ts +1 -0
  2. package/es/citybuliding/building.js +1 -1
  3. package/es/core/BaseLayer.js +10 -3
  4. package/es/core/interface.d.ts +26 -48
  5. package/es/core/interface.js +3 -0
  6. package/es/core/schema.d.ts +3 -3
  7. package/es/core/triangulation.d.ts +4 -3
  8. package/es/core/triangulation.js +54 -39
  9. package/es/image/models/image.js +7 -1
  10. package/es/line/models/arc.js +1 -1
  11. package/es/line/models/simpleLine.js +1 -1
  12. package/es/line/shaders/line_arc_vert.glsl +5 -3
  13. package/es/line/shaders/simple/simpleline_vert.glsl +1 -0
  14. package/es/point/models/fill.js +5 -2
  15. package/es/point/models/fillmage.js +9 -3
  16. package/es/point/models/image.js +8 -2
  17. package/es/point/models/radar.js +2 -3
  18. package/es/point/models/tile.js +1 -1
  19. package/es/point/shaders/fill_vert.glsl +13 -6
  20. package/es/point/shaders/image/fillImage_vert.glsl +13 -5
  21. package/es/point/shaders/image_vert.glsl +17 -8
  22. package/es/tile/manager/tileLayerManager.d.ts +3 -2
  23. package/es/tile/manager/tileLayerManager.js +3 -1
  24. package/es/tile/models/tileModel.js +4 -3
  25. package/es/tile/tileFactory/base.d.ts +1 -1
  26. package/es/tile/tileFactory/base.js +32 -5
  27. package/es/tile/tileFactory/vectorLayer.d.ts +3 -1
  28. package/es/tile/tileFactory/vectorLayer.js +22 -1
  29. package/es/tile/tileLayer/baseTileLayer.d.ts +1 -1
  30. package/es/tile/tileLayer/baseTileLayer.js +3 -2
  31. package/es/tile/utils.js +1 -1
  32. package/lib/citybuliding/building.js +1 -1
  33. package/lib/core/BaseLayer.js +8 -3
  34. package/lib/core/triangulation.js +48 -31
  35. package/lib/image/models/image.js +6 -1
  36. package/lib/line/shaders/line_arc_vert.glsl +5 -3
  37. package/lib/line/shaders/simple/simpleline_vert.glsl +1 -0
  38. package/lib/point/models/fill.js +3 -1
  39. package/lib/point/models/fillmage.js +6 -2
  40. package/lib/point/models/image.js +5 -1
  41. package/lib/point/models/radar.js +2 -3
  42. package/lib/point/models/tile.js +1 -1
  43. package/lib/point/shaders/fill_vert.glsl +13 -6
  44. package/lib/point/shaders/image/fillImage_vert.glsl +13 -5
  45. package/lib/point/shaders/image_vert.glsl +17 -8
  46. package/lib/tile/manager/tileLayerManager.js +3 -1
  47. package/lib/tile/models/tileModel.js +4 -3
  48. package/lib/tile/tileFactory/base.js +22 -4
  49. package/lib/tile/tileFactory/vectorLayer.js +16 -1
  50. package/lib/tile/tileLayer/baseTileLayer.js +3 -2
  51. package/lib/tile/utils.js +1 -1
  52. package/package.json +7 -6
@@ -69,7 +69,9 @@ var ImageModel = class extends import_BaseModel.default {
69
69
  this.texture = createTexture2D({
70
70
  data: imageData[0],
71
71
  width: imageData[0].width,
72
- height: imageData[0].height
72
+ height: imageData[0].height,
73
+ mag: import_l7_core.gl.LINEAR,
74
+ min: import_l7_core.gl.LINEAR
73
75
  });
74
76
  this.layerService.updateLayerRenderList();
75
77
  this.layerService.renderLayers();
@@ -81,6 +83,9 @@ var ImageModel = class extends import_BaseModel.default {
81
83
  fragmentShader: import_image_frag.default,
82
84
  triangulation: import_triangulation.RasterImageTriangulation,
83
85
  primitive: import_l7_core.gl.TRIANGLES,
86
+ blend: {
87
+ enable: false
88
+ },
84
89
  depth: { enable: false },
85
90
  stencil: (0, import_l7_utils.getMask)(mask, maskInside)
86
91
  }).then((model) => {
@@ -52,7 +52,8 @@ vec2 midPoint(vec2 source, vec2 target, float arcThetaOffset) {
52
52
  // return mid;
53
53
  }
54
54
  float getSegmentRatio(float index) {
55
- return smoothstep(0.0, 1.0, index / (segmentNumber - 1.));
55
+ // return smoothstep(0.0, 1.0, index / (segmentNumber - 1.));
56
+ return index / (segmentNumber - 1.);
56
57
  }
57
58
  vec2 interpolate (vec2 source, vec2 target, float t, float arcThetaOffset) {
58
59
  // if the angularDist is PI, linear interpolation is applied. otherwise, use spherical interpolation
@@ -130,8 +131,9 @@ void main() {
130
131
  styleMappingMat[3].b = d_distance_ratio;
131
132
 
132
133
  // styleMappingMat[0][1] - arcThetaOffset
133
- vec4 curr = project_position(vec4(interpolate(source, target, segmentRatio, styleMappingMat[0][1]), 0.0, 1.0));
134
- vec4 next = project_position(vec4(interpolate(source, target, nextSegmentRatio, styleMappingMat[0][1]), 0.0, 1.0));
134
+ float arcThetaOffset = styleMappingMat[0][1];
135
+ vec4 curr = project_position(vec4(interpolate(source, target, segmentRatio, arcThetaOffset), 0.0, 1.0));
136
+ vec4 next = project_position(vec4(interpolate(source, target, nextSegmentRatio, arcThetaOffset), 0.0, 1.0));
135
137
  // v_normal = getNormal((next.xy - curr.xy) * indexDir, a_Position.y);
136
138
  //unProjCustomCoord
137
139
 
@@ -74,5 +74,6 @@ void main() {
74
74
  }
75
75
 
76
76
  gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy, lineHeight + h, 1.0));
77
+ gl_PointSize = 10.0;
77
78
  }
78
79
  }
@@ -51,6 +51,7 @@ var FillModel = class extends import_BaseModel.default {
51
51
  blend,
52
52
  blur = 0,
53
53
  raisingHeight = 0,
54
+ heightfixed = false,
54
55
  unit = "l7size"
55
56
  } = this.layer.getLayerConfig();
56
57
  this.updateUnit(unit);
@@ -89,6 +90,7 @@ var FillModel = class extends import_BaseModel.default {
89
90
  }
90
91
  return {
91
92
  u_raisingHeight: Number(raisingHeight),
93
+ u_heightfixed: Number(heightfixed),
92
94
  u_meter2coord: this.meter2coord,
93
95
  u_meteryScale: this.meteryScale,
94
96
  u_isMeter: Number(this.isMeter),
@@ -142,7 +144,7 @@ var FillModel = class extends import_BaseModel.default {
142
144
  maxLat === minLat ? minLat + 0.1 : maxLat
143
145
  ]);
144
146
  this.meter2coord = (m1 + m2) / 2;
145
- if (!Boolean(this.meter2coord)) {
147
+ if (!this.meter2coord) {
146
148
  this.meter2coord = 7.70681090738883;
147
149
  }
148
150
  }
@@ -66,7 +66,9 @@ var FillImageModel = class extends import_BaseModel.default {
66
66
  const {
67
67
  opacity = 1,
68
68
  offsets = [0, 0],
69
- rotation
69
+ rotation,
70
+ raisingHeight = 0,
71
+ heightfixed = false
70
72
  } = this.layer.getLayerConfig();
71
73
  if (this.rendererService.getDirty()) {
72
74
  this.texture.bind();
@@ -104,6 +106,8 @@ var FillImageModel = class extends import_BaseModel.default {
104
106
  });
105
107
  }
106
108
  return {
109
+ u_raisingHeight: Number(raisingHeight),
110
+ u_heightfixed: Number(heightfixed),
107
111
  u_isMeter: Number(this.isMeter),
108
112
  u_RotateMatrix: new Float32Array([
109
113
  Math.cos(this.radian),
@@ -154,7 +158,7 @@ var FillImageModel = class extends import_BaseModel.default {
154
158
  maxLat === minLat ? minLat + 0.1 : maxLat
155
159
  ]);
156
160
  this.meter2coord = (m1 + m2) / 2;
157
- if (!Boolean(this.meter2coord)) {
161
+ if (!this.meter2coord) {
158
162
  this.meter2coord = 7.70681090738883;
159
163
  }
160
164
  }
@@ -61,7 +61,9 @@ var ImageModel = class extends import_BaseModel.default {
61
61
  getUninforms() {
62
62
  const {
63
63
  opacity = 1,
64
- offsets = [0, 0]
64
+ offsets = [0, 0],
65
+ raisingHeight = 0,
66
+ heightfixed = false
65
67
  } = this.layer.getLayerConfig();
66
68
  if (this.rendererService.getDirty()) {
67
69
  this.texture.bind();
@@ -94,6 +96,8 @@ var ImageModel = class extends import_BaseModel.default {
94
96
  });
95
97
  }
96
98
  return {
99
+ u_raisingHeight: Number(raisingHeight),
100
+ u_heightfixed: Number(heightfixed),
97
101
  u_dataTexture: this.dataTexture,
98
102
  u_cellTypeLayout: this.getCellTypeLayout(),
99
103
  u_texture: this.texture,
@@ -125,7 +125,7 @@ var RadarModel = class extends import_BaseModel.default {
125
125
  maxLat === minLat ? minLat + 0.1 : maxLat
126
126
  ]);
127
127
  this.meter2coord = (m1 + m2) / 2;
128
- if (!Boolean(this.meter2coord)) {
128
+ if (!this.meter2coord) {
129
129
  this.meter2coord = 7.70681090738883;
130
130
  }
131
131
  }
@@ -169,8 +169,7 @@ var RadarModel = class extends import_BaseModel.default {
169
169
  },
170
170
  size: 3,
171
171
  update: (feature, featureIdx, vertex, attributeIdx) => {
172
- let extrude;
173
- extrude = [1, 1, 0, -1, 1, 0, -1, -1, 0, 1, -1, 0];
172
+ const extrude = [1, 1, 0, -1, 1, 0, -1, -1, 0, 1, -1, 0];
174
173
  const extrudeIndex = attributeIdx % 4 * 3;
175
174
  return [
176
175
  extrude[extrudeIndex],
@@ -131,7 +131,7 @@ var FillModel = class extends import_BaseModel.default {
131
131
  maxLat === minLat ? minLat + 0.1 : maxLat
132
132
  ]);
133
133
  this.meter2coord = (m1 + m2) / 2;
134
- if (!Boolean(this.meter2coord)) {
134
+ if (!this.meter2coord) {
135
135
  this.meter2coord = 7.70681090738883;
136
136
  }
137
137
  }
@@ -24,6 +24,7 @@ uniform vec2 u_offsets;
24
24
 
25
25
  uniform float u_blur : 0.0;
26
26
  uniform float u_raisingHeight: 0.0;
27
+ uniform float u_heightfixed: 0.0;
27
28
 
28
29
  #pragma include "styleMapping"
29
30
  #pragma include "styleMappingCalOpacity"
@@ -164,16 +165,22 @@ void main() {
164
165
  vec4 project_pos = project_position(vec4(aPosition.xy, 0.0, 1.0));
165
166
  // gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offset, project_pixel(setPickingOrder(0.0)), 1.0));
166
167
 
167
- float raiseHeight = u_raisingHeight;
168
- if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) {
169
- float mapboxZoomScale = 4.0/pow(2.0, 21.0 - u_Zoom);
170
- raiseHeight = u_raisingHeight * mapboxZoomScale;
168
+ float raisingHeight = u_raisingHeight;
169
+
170
+ if(u_heightfixed < 1.0) { // false
171
+ raisingHeight = project_pixel(u_raisingHeight);
172
+ } else {
173
+ if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) {
174
+ float mapboxZoomScale = 4.0/pow(2.0, 21.0 - u_Zoom);
175
+ raisingHeight = u_raisingHeight * mapboxZoomScale;
176
+ }
171
177
  }
178
+
172
179
 
173
180
  if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x
174
- gl_Position = u_Mvp * vec4(project_pos.xy + offset, raiseHeight, 1.0);
181
+ gl_Position = u_Mvp * vec4(project_pos.xy + offset, raisingHeight, 1.0);
175
182
  } else {
176
- gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offset, u_raisingHeight, 1.0));
183
+ gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offset, raisingHeight, 1.0));
177
184
  }
178
185
 
179
186
  // gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offset, 0.0, 1.0));
@@ -15,6 +15,8 @@ uniform float u_isMeter;
15
15
  varying vec2 v_uv; // 本身的 uv 坐标
16
16
  varying vec2 v_Iconuv; // icon 贴图的 uv 坐标
17
17
 
18
+ uniform float u_raisingHeight: 0.0;
19
+ uniform float u_heightfixed: 0.0;
18
20
  uniform float u_opacity : 1;
19
21
  uniform vec2 u_offsets;
20
22
 
@@ -91,15 +93,21 @@ void main() {
91
93
  }
92
94
  }
93
95
 
94
-
95
- // vec4 project_pos = project_position(vec4(a_Position.xy, 0.0, 1.0));
96
96
  vec4 project_pos = project_position(vec4(aPosition.xy, 0.0, 1.0));
97
- // gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offset, project_pixel(setPickingOrder(0.0)), 1.0));
97
+ float raisingHeight = u_raisingHeight;
98
+ if(u_heightfixed < 1.0) { // height fixed
99
+ raisingHeight = project_pixel(u_raisingHeight);
100
+ } else {
101
+ if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) {
102
+ float mapboxZoomScale = 4.0/pow(2.0, 21.0 - u_Zoom);
103
+ raisingHeight = u_raisingHeight * mapboxZoomScale;
104
+ }
105
+ }
98
106
 
99
107
  if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x
100
- gl_Position = u_Mvp * vec4(project_pos.xy + offset, 0.0, 1.0);
108
+ gl_Position = u_Mvp * vec4(project_pos.xy + offset, raisingHeight, 1.0);
101
109
  } else {
102
- gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offset, project_pixel(setPickingOrder(0.0)), 1.0));
110
+ gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offset, raisingHeight, 1.0));
103
111
  }
104
112
 
105
113
  // gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offset, 0.0, 1.0));
@@ -10,6 +10,8 @@ uniform mat4 u_Mvp;
10
10
  uniform vec2 u_offsets;
11
11
 
12
12
  uniform float u_opacity : 1;
13
+ uniform float u_raisingHeight: 0.0;
14
+ uniform float u_heightfixed: 0.0;
13
15
 
14
16
  varying mat4 styleMappingMat; // 用于将在顶点着色器中计算好的样式值传递给片元
15
17
 
@@ -61,21 +63,28 @@ void main() {
61
63
  }
62
64
 
63
65
  // cal style mapping - 数据纹理映射部分的计算
64
- v_color = a_Color;
65
- v_uv = a_Uv;
66
- vec4 project_pos = project_position(vec4(a_Position, 1.0));
66
+ v_color = a_Color;
67
+ v_uv = a_Uv;
68
+ vec4 project_pos = project_position(vec4(a_Position, 1.0));
67
69
 
68
- // vec2 offset = project_pixel(u_offsets);
69
70
  vec2 offset = project_pixel(textrueOffsets);
70
71
 
71
- // gl_Position = project_common_position_to_clipspace(vec4(vec2(project_pos.xy + offset),project_pos.z, 1.0));
72
+ float raisingHeight = u_raisingHeight;
73
+ if(u_heightfixed < 1.0) { // false
74
+ raisingHeight = project_pixel(u_raisingHeight);
75
+ } else {
76
+ if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) {
77
+ float mapboxZoomScale = 4.0/pow(2.0, 21.0 - u_Zoom);
78
+ raisingHeight = u_raisingHeight * mapboxZoomScale;
79
+ }
80
+ }
72
81
 
73
82
  if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x
74
- gl_Position = u_Mvp * vec4(vec2(project_pos.xy + offset),project_pos.z, 1.0);
83
+ gl_Position = u_Mvp * vec4(project_pos.xy + offset, raisingHeight, 1.0);
75
84
  } else {
76
- gl_Position = project_common_position_to_clipspace(vec4(vec2(project_pos.xy + offset),project_pos.z, 1.0));
85
+ gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offset, raisingHeight, 1.0));
77
86
  }
78
- gl_PointSize = a_Size * 2.0 * u_DevicePixelRatio;
79
87
 
88
+ gl_PointSize = a_Size * 2.0 * u_DevicePixelRatio;
80
89
  setPickingColor(a_PickingColor);
81
90
  }
@@ -31,11 +31,12 @@ var import_utils = require("../utils");
31
31
  var import_tileConfigManager = __toESM(require("./tileConfigManager"));
32
32
  var import_tilePickerManager = __toESM(require("./tilePickerManager"));
33
33
  var TileLayerManager = class {
34
- constructor(parent, mapService, rendererService, pickingService, layerService) {
34
+ constructor(parent, mapService, rendererService, pickingService, layerService, transforms) {
35
35
  this.parent = parent;
36
36
  this.children = parent.layerChildren;
37
37
  this.mapService = mapService;
38
38
  this.rendererService = rendererService;
39
+ this.transforms = transforms;
39
40
  this.tilePickManager = new import_tilePickerManager.default(parent, rendererService, pickingService, this.children, layerService);
40
41
  this.tileConfigManager = new import_tileConfigManager.default();
41
42
  this.setSubLayerInitOptipn();
@@ -145,6 +146,7 @@ var TileLayerManager = class {
145
146
  }
146
147
  this.initOptions = {
147
148
  layerType: this.parent.type,
149
+ transforms: this.transforms,
148
150
  shape: layerShape,
149
151
  zIndex,
150
152
  opacity,
@@ -32,14 +32,15 @@ var RasterTileModel = class extends import_BaseModel.default {
32
32
  return {};
33
33
  }
34
34
  initModels() {
35
- var _a;
36
- if ((_a = this.layer.getSource()) == null ? void 0 : _a.data.isTile) {
35
+ const source = this.layer.getSource();
36
+ if (source == null ? void 0 : source.data.isTile) {
37
37
  this.layer.tileLayer = new import_tmsTileLayer.TMSTileLayer({
38
38
  parent: this.layer,
39
39
  rendererService: this.rendererService,
40
40
  mapService: this.mapService,
41
41
  layerService: this.layerService,
42
- pickingService: this.pickingService
42
+ pickingService: this.pickingService,
43
+ transforms: source.transforms
43
44
  });
44
45
  }
45
46
  return this.buildModels();
@@ -32,6 +32,7 @@ var import_utils = require("../utils");
32
32
  var import_vectorLayer = __toESM(require("./vectorLayer"));
33
33
  var turf = __toESM(require("@turf/helpers"));
34
34
  var import_union = __toESM(require("@turf/union"));
35
+ var import_polygon_to_line = __toESM(require("@turf/polygon-to-line"));
35
36
  var TileFactory = class {
36
37
  constructor(option) {
37
38
  this.outSideEventTimer = null;
@@ -62,7 +63,7 @@ var TileFactory = class {
62
63
  vectorTileLayer: null,
63
64
  source: null
64
65
  };
65
- const { sourceLayer, featureId } = initOptions;
66
+ const { sourceLayer, featureId, transforms, layerType, shape } = initOptions;
66
67
  if (!sourceLayer) {
67
68
  return emptyData;
68
69
  }
@@ -71,17 +72,34 @@ var TileFactory = class {
71
72
  if (!(Array.isArray(features) && features.length > 0)) {
72
73
  return emptyData;
73
74
  } else {
75
+ let geofeatures = [];
76
+ if (layerType === "LineLayer" && shape === "simple") {
77
+ features.map((feature) => {
78
+ if (feature.geometry.type === "MultiPolygon") {
79
+ const linefeatures = (0, import_polygon_to_line.default)(feature).features;
80
+ geofeatures.push(...linefeatures);
81
+ } else if (feature.geometry.type === "Polygon") {
82
+ feature.geometry.type = "MultiLineString";
83
+ geofeatures.push(feature);
84
+ } else {
85
+ geofeatures.push(feature);
86
+ }
87
+ });
88
+ } else {
89
+ geofeatures = features;
90
+ }
74
91
  const source = new import_l7_source.default({
75
92
  type: "FeatureCollection",
76
- features
93
+ features: geofeatures
77
94
  }, {
78
95
  parser: {
79
96
  type: "geojson",
80
97
  featureId
81
- }
98
+ },
99
+ transforms
82
100
  });
83
101
  return {
84
- features,
102
+ features: geofeatures,
85
103
  featureId,
86
104
  vectorTileLayer,
87
105
  source
@@ -27,6 +27,7 @@ __export(vectorLayer_exports, {
27
27
  module.exports = __toCommonJS(vectorLayer_exports);
28
28
  var import_BaseLayer = __toESM(require("../../core/BaseLayer"));
29
29
  var import_tile = __toESM(require("../../line/models/tile"));
30
+ var import_simpleLine = __toESM(require("../../line/models/simpleLine"));
30
31
  var import_text = __toESM(require("../../point/models/text"));
31
32
  var import_tile2 = __toESM(require("../../point/models/tile"));
32
33
  var import_tile3 = __toESM(require("../../polygon/models/tile"));
@@ -59,13 +60,27 @@ var VectorLayer = class extends import_BaseLayer.default {
59
60
  case "PolygonLayer":
60
61
  return import_tile3.default;
61
62
  case "LineLayer":
62
- return import_tile.default;
63
+ return this.getLineModel();
63
64
  case "PointLayer":
64
65
  return this.getPointModel();
65
66
  default:
66
67
  return import_tile2.default;
67
68
  }
68
69
  }
70
+ getLineModel() {
71
+ var _a;
72
+ const shapeAttribute = this.styleAttributeService.getLayerStyleAttribute("shape");
73
+ const shape = (_a = shapeAttribute == null ? void 0 : shapeAttribute.scale) == null ? void 0 : _a.field;
74
+ switch (shape) {
75
+ case "tileline":
76
+ case "line":
77
+ return import_tile.default;
78
+ case "simple":
79
+ return import_simpleLine.default;
80
+ default:
81
+ return import_tile.default;
82
+ }
83
+ }
69
84
  getPointModel() {
70
85
  const layerData = this.getEncodedData();
71
86
  const { shape2d } = this.getLayerConfig();
@@ -30,7 +30,8 @@ var BaseTileLayer = class {
30
30
  rendererService,
31
31
  mapService,
32
32
  layerService,
33
- pickingService
33
+ pickingService,
34
+ transforms
34
35
  }) {
35
36
  this.type = "baseTile";
36
37
  this.initedTileset = false;
@@ -45,7 +46,7 @@ var BaseTileLayer = class {
45
46
  this.parent = parent;
46
47
  this.mapService = mapService;
47
48
  this.layerService = layerService;
48
- this.tileLayerManager = new import_tileLayerManager.TileLayerManager(parent, mapService, rendererService, pickingService, layerService);
49
+ this.tileLayerManager = new import_tileLayerManager.TileLayerManager(parent, mapService, rendererService, pickingService, layerService, transforms);
49
50
  this.initTileSetManager();
50
51
  this.bindSubLayerEvent();
51
52
  this.bindSubLayerPick();
package/lib/tile/utils.js CHANGED
@@ -73,7 +73,7 @@ function getMaskValue(layerType, mask) {
73
73
  }
74
74
  }
75
75
  function getContainerSize(container) {
76
- if (!!container.getContext) {
76
+ if (container.getContext) {
77
77
  return {
78
78
  width: container.width / import_l7_utils.DOM.DPR,
79
79
  height: container.height / import_l7_utils.DOM.DPR
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antv/l7-layers",
3
- "version": "2.9.22-alpha.0",
3
+ "version": "2.9.24",
4
4
  "description": "L7's collection of built-in layers",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -27,14 +27,15 @@
27
27
  "license": "ISC",
28
28
  "dependencies": {
29
29
  "@antv/async-hook": "^2.1.0",
30
- "@antv/l7-core": "2.9.22-alpha.0",
31
- "@antv/l7-maps": "2.9.22-alpha.0",
32
- "@antv/l7-source": "2.9.22-alpha.0",
33
- "@antv/l7-utils": "2.9.22-alpha.0",
30
+ "@antv/l7-core": "2.9.24",
31
+ "@antv/l7-maps": "2.9.24",
32
+ "@antv/l7-source": "2.9.24",
33
+ "@antv/l7-utils": "2.9.24",
34
34
  "@babel/runtime": "^7.7.7",
35
35
  "@mapbox/martini": "^0.2.0",
36
36
  "@turf/helpers": "^6.1.4",
37
37
  "@turf/meta": "^6.0.2",
38
+ "@turf/polygon-to-line": "^6.5.0",
38
39
  "@turf/union": "^6.5.0",
39
40
  "d3-array": "1",
40
41
  "d3-color": "^1.4.0",
@@ -60,7 +61,7 @@
60
61
  "@types/gl-matrix": "^2.4.5",
61
62
  "@types/lodash": "^4.14.138"
62
63
  },
63
- "gitHead": "df0d36c7370eaa2712be99e81b558cfb4f1d8322",
64
+ "gitHead": "0d84d477dc449e4541bdcaabbb29e6765d37b079",
64
65
  "publishConfig": {
65
66
  "access": "public"
66
67
  }