mirror of https://gitee.com/antv-l7/antv-l7
fix: 修复 ExtrudePolyLine 对应的单元测试逻辑
This commit is contained in:
parent
02a181a406
commit
9d2e91853a
|
@ -9,7 +9,7 @@ import {
|
|||
const scene = new Scene({
|
||||
id: 'map',
|
||||
map: new Mapbox({
|
||||
center: [116.3956, 39.9392],
|
||||
center: [ 116.3956, 39.9392 ],
|
||||
pitch: 0,
|
||||
zoom: 10,
|
||||
rotation: 0,
|
||||
|
@ -18,15 +18,15 @@ const scene = new Scene({
|
|||
});
|
||||
scene.on('loaded', () => {
|
||||
fetch(
|
||||
'https://gw.alipayobjects.com/os/basement_prod/0d2f0113-f48b-4db9-8adc-a3937243d5a3.json'
|
||||
)
|
||||
'https://gw.alipayobjects.com/os/basement_prod/0d2f0113-f48b-4db9-8adc-a3937243d5a3.json'
|
||||
)
|
||||
.then(res => res.json())
|
||||
.then(data => {
|
||||
const layer = new LineLayer({})
|
||||
.source(data)
|
||||
.size(1.5)
|
||||
.shape('line')
|
||||
.color('标准名称', ['#5B8FF9', '#5CCEA1', '#5D7092']);
|
||||
.color('标准名称', [ '#5B8FF9', '#5CCEA1', '#5D7092' ]);
|
||||
scene.addLayer(layer);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -18,6 +18,6 @@ describe('extrude polyline', () => {
|
|||
coord[1] = lat;
|
||||
});
|
||||
const mesh = extrude.extrude(coords);
|
||||
expect(mesh.indices.length).toBe(12);
|
||||
expect(mesh.indices.length).toBe(6);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue