Skip to content

Commit 14faaff

Browse files
committed
【feature】mapboxgl 对接webmap3.0 l7 图例
1 parent f0d0716 commit 14faaff

File tree

4 files changed

+677
-638
lines changed

4 files changed

+677
-638
lines changed

src/mapboxgl/mapping/utils/L7LayerUtil.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1953,7 +1953,7 @@ export async function addL7Layers({ map, webMapInfo, l7Layers, spriteDatas, opti
19531953
for (const l of formateL7Layers) {
19541954
const layerIndex = layers.findIndex((wLayer) => wLayer.id === l.id);
19551955
// 从剩下的图层中找到第一个通过setStyle已经添加过的mapboxgl图层
1956-
const beforeLayer = layers.slice(layerIndex + 1).find((r) => !isMapboxUnSupportLayer(r));
1956+
const beforeLayer = layers.slice(layerIndex + 1).find((r) => !isL7Layer(r));
19571957
if (l.layerType === AntvL7LayerType.MarkerLayer) {
19581958
const actionLayer = l;
19591959
(l.options || {}).visible !== false && addL7MarkerLayer(actionLayer, scene);
@@ -1969,7 +1969,7 @@ export async function addL7Layers({ map, webMapInfo, l7Layers, spriteDatas, opti
19691969
* mapboxgl不支持渲染的图层类型
19701970
* @param layer
19711971
*/
1972-
export function isMapboxUnSupportLayer(layer) {
1972+
export function isL7Layer(layer) {
19731973
const layout = layer.layout || {};
19741974
return (
19751975
(layer.type === 'circle' && layout['circle-animate-rings']) || // 动画点

0 commit comments

Comments
 (0)