@antv/l7-layers 2.13.2 → 2.13.4
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.
|
@@ -21,6 +21,6 @@ export declare class TilePickService implements ITilePickService {
|
|
|
21
21
|
private color2PickId;
|
|
22
22
|
private pickId2Color;
|
|
23
23
|
/** 从瓦片中根据数据 */
|
|
24
|
-
getFeatureById(pickedFeatureIdx: number):
|
|
24
|
+
getFeatureById(pickedFeatureIdx: number): any[];
|
|
25
25
|
pickRasterLayer(layer: ILayer, target: IInteractionTarget, parent?: ILayer): boolean;
|
|
26
26
|
}
|
|
@@ -148,18 +148,13 @@ export var TilePickService = /*#__PURE__*/function () {
|
|
|
148
148
|
}); // 提取当前可见瓦片中匹配 ID 的 feature 列表
|
|
149
149
|
|
|
150
150
|
var features = [];
|
|
151
|
-
tiles.
|
|
151
|
+
tiles.forEach(function (tile) {
|
|
152
152
|
features.push.apply(features, _toConsumableArray(tile.getFeatureById(pickedFeatureIdx)));
|
|
153
|
-
});
|
|
154
|
-
|
|
155
|
-
if (features.length <= 0) {
|
|
156
|
-
return null;
|
|
157
|
-
} // 将 feature 列表合并后返回
|
|
153
|
+
}); // 将 feature 列表合并后返回
|
|
158
154
|
// 统一返回成 polygon 的格式 点、线、面可以通用
|
|
159
155
|
// const data = this.tileSourceService.getCombineFeature(features);
|
|
160
156
|
|
|
161
|
-
|
|
162
|
-
return [];
|
|
157
|
+
return features;
|
|
163
158
|
} // Tip: for interface define
|
|
164
159
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
165
160
|
|
|
@@ -163,7 +163,8 @@ var VectorTile = /*#__PURE__*/function (_Tile) {
|
|
|
163
163
|
minZoom: this.z - 1
|
|
164
164
|
});
|
|
165
165
|
}
|
|
166
|
-
}
|
|
166
|
+
} // 获取瓦片数据
|
|
167
|
+
|
|
167
168
|
}, {
|
|
168
169
|
key: "getFeatures",
|
|
169
170
|
value: function getFeatures(sourceLayer) {
|
|
@@ -185,9 +186,10 @@ var VectorTile = /*#__PURE__*/function (_Tile) {
|
|
|
185
186
|
return [];
|
|
186
187
|
}
|
|
187
188
|
|
|
188
|
-
|
|
189
|
+
var res = layer.getSource().data.dataArray.filter(function (d) {
|
|
189
190
|
return d._id === id;
|
|
190
191
|
});
|
|
192
|
+
return res;
|
|
191
193
|
}
|
|
192
194
|
}]);
|
|
193
195
|
|
|
@@ -163,18 +163,13 @@ var TilePickService = /*#__PURE__*/function () {
|
|
|
163
163
|
}); // 提取当前可见瓦片中匹配 ID 的 feature 列表
|
|
164
164
|
|
|
165
165
|
var features = [];
|
|
166
|
-
tiles.
|
|
166
|
+
tiles.forEach(function (tile) {
|
|
167
167
|
features.push.apply(features, (0, _toConsumableArray2.default)(tile.getFeatureById(pickedFeatureIdx)));
|
|
168
|
-
});
|
|
169
|
-
|
|
170
|
-
if (features.length <= 0) {
|
|
171
|
-
return null;
|
|
172
|
-
} // 将 feature 列表合并后返回
|
|
168
|
+
}); // 将 feature 列表合并后返回
|
|
173
169
|
// 统一返回成 polygon 的格式 点、线、面可以通用
|
|
174
170
|
// const data = this.tileSourceService.getCombineFeature(features);
|
|
175
171
|
|
|
176
|
-
|
|
177
|
-
return [];
|
|
172
|
+
return features;
|
|
178
173
|
} // Tip: for interface define
|
|
179
174
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
180
175
|
|
|
@@ -180,7 +180,8 @@ var VectorTile = /*#__PURE__*/function (_Tile) {
|
|
|
180
180
|
minZoom: this.z - 1
|
|
181
181
|
});
|
|
182
182
|
}
|
|
183
|
-
}
|
|
183
|
+
} // 获取瓦片数据
|
|
184
|
+
|
|
184
185
|
}, {
|
|
185
186
|
key: "getFeatures",
|
|
186
187
|
value: function getFeatures(sourceLayer) {
|
|
@@ -202,9 +203,10 @@ var VectorTile = /*#__PURE__*/function (_Tile) {
|
|
|
202
203
|
return [];
|
|
203
204
|
}
|
|
204
205
|
|
|
205
|
-
|
|
206
|
+
var res = layer.getSource().data.dataArray.filter(function (d) {
|
|
206
207
|
return d._id === id;
|
|
207
208
|
});
|
|
209
|
+
return res;
|
|
208
210
|
}
|
|
209
211
|
}]);
|
|
210
212
|
return VectorTile;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antv/l7-layers",
|
|
3
|
-
"version": "2.13.
|
|
3
|
+
"version": "2.13.4",
|
|
4
4
|
"description": "L7's collection of built-in layers",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
"license": "ISC",
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@antv/async-hook": "^2.2.9",
|
|
30
|
-
"@antv/l7-core": "2.13.
|
|
31
|
-
"@antv/l7-maps": "2.13.
|
|
32
|
-
"@antv/l7-source": "2.13.
|
|
33
|
-
"@antv/l7-utils": "2.13.
|
|
30
|
+
"@antv/l7-core": "2.13.4",
|
|
31
|
+
"@antv/l7-maps": "2.13.4",
|
|
32
|
+
"@antv/l7-source": "2.13.4",
|
|
33
|
+
"@antv/l7-utils": "2.13.4",
|
|
34
34
|
"@babel/runtime": "^7.7.7",
|
|
35
35
|
"@mapbox/martini": "^0.2.0",
|
|
36
36
|
"@turf/clone": "^6.5.0",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"@types/gl-matrix": "^2.4.5",
|
|
62
62
|
"@types/lodash": "^4.14.138"
|
|
63
63
|
},
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "cdbe33fc2bab9da5ec85cbad98d32aa957b9506b",
|
|
65
65
|
"publishConfig": {
|
|
66
66
|
"access": "public"
|
|
67
67
|
}
|