Skip to content

Commit f528456

Browse files
committed
【fix】修复例子报错
1 parent 0f4f024 commit f528456

File tree

2 files changed

+2
-17
lines changed

2 files changed

+2
-17
lines changed

examples/mapboxgl/l7_heading_chart.html

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,9 @@
7070
scene.addImage('plane', '../img/0ca1668e-38c2-4010-8568-b57cb33839b9.svg');
7171
});
7272
Promise.all([
73-
fetch('https://iclient.supermap.io/web/data/L7/2960e1fc-b543-480f-a65e-d14c229dd777.json').then((d) => d.json()),
7473
fetch('https://iclient.supermap.io/web/data/L7/4472780b-fea1-4fc2-9e4b-3ca716933dc7.json').then((d) => d.text()),
7574
fetch('https://iclient.supermap.io/web/data/L7/a5ac7bce-181b-40d1-8a16-271356264ad8.json').then((d) => d.text())
76-
]).then(function onLoad([world, dot, flyline]) {
75+
]).then(function onLoad([dot, flyline]) {
7776
const dotData = eval(dot);
7877
const flydata = eval(flyline).map((item) => {
7978
const latlng1 = item.from.split(',').map((e) => {
@@ -84,12 +83,6 @@
8483
});
8584
return { coord: [latlng1, latlng2] };
8685
});
87-
var worldLine = new mapboxgl.supermap.L7Layer({ type: 'LineLayer' });
88-
var l7Layer = worldLine.getL7Layer();
89-
l7Layer.source(world).color('#41fc9d').size(0.5).style({
90-
opacity: 0.4
91-
});
92-
map.addLayer(worldLine);
9386

9487
var dotPoint = new mapboxgl.supermap.L7Layer({ type: 'PointLayer' });
9588
dotPoint

examples/maplibregl/l7_heading_chart.html

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,9 @@
7070
scene.addImage('plane', '../img/0ca1668e-38c2-4010-8568-b57cb33839b9.svg');
7171
});
7272
Promise.all([
73-
fetch('https://iclient.supermap.io/web/data/L7/2960e1fc-b543-480f-a65e-d14c229dd777.json').then((d) => d.json()),
7473
fetch('https://iclient.supermap.io/web/data/L7/4472780b-fea1-4fc2-9e4b-3ca716933dc7.json').then((d) => d.text()),
7574
fetch('https://iclient.supermap.io/web/data/L7/a5ac7bce-181b-40d1-8a16-271356264ad8.json').then((d) => d.text())
76-
]).then(function onLoad([world, dot, flyline]) {
75+
]).then(function onLoad([dot, flyline]) {
7776
const dotData = eval(dot);
7877
const flydata = eval(flyline).map((item) => {
7978
const latlng1 = item.from.split(',').map((e) => {
@@ -84,13 +83,6 @@
8483
});
8584
return { coord: [latlng1, latlng2] };
8685
});
87-
var worldLine = new maplibregl.supermap.L7Layer({ type: 'LineLayer' });
88-
var l7Layer = worldLine.getL7Layer();
89-
l7Layer.source(world).color('#41fc9d').size(0.5).style({
90-
opacity: 0.4
91-
});
92-
map.addLayer(worldLine);
93-
9486
var dotPoint = new maplibregl.supermap.L7Layer({ type: 'PointLayer' });
9587
dotPoint
9688
.getL7Layer()

0 commit comments

Comments
 (0)