-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbreathPoints.js
More file actions
54 lines (51 loc) · 1.41 KB
/
Copy pathbreathPoints.js
File metadata and controls
54 lines (51 loc) · 1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
var geoLevelF = new Loca.GeoJSONSource({
// data: [],
// url: 'https://a.amap.com/Loca/static/loca-v2/demos/mock_data/sz_road_F.json',
url: 'http://localhost:8080/datavis/csv/javascript/20170224.json'
});
var breathRed = new Loca.ScatterLayer({
loca,
zIndex: 113,
opacity: 1,
visible: true,
zooms: [9, 22],
});
breathRed.setSource(geoLevelF);
breathRed.setStyle({
color: 'rgba(243,56,175,0.1)',
unit: 'meter',
size: [500, 600],
borderWidth: 0,
texture: 'https://a.amap.com/Loca/static/loca-v2/demos/images/breath_red.png',
duration: 500,
animate: true,
});
// 黄色呼吸点
var geoLevelE = new Loca.GeoJSONSource({
// data: [],
// url: 'https://a.amap.com/Loca/static/loca-v2/demos/mock_data/sz_road_E.json',
url: 'http://localhost:8080/datavis/csv/javascript/20170225.json'
});
var breathYellow = new Loca.ScatterLayer({
loca,
zIndex: 112,
opacity: 1,
visible: true,
zooms: [9, 22],
});
breathYellow.setSource(geoLevelE);
breathYellow.setStyle({
color: 'rgba(243,253,75,0.1)',
unit: 'meter',
size: [300, 500],
borderWidth: 0,
// texture: 'https://a.amap.com/Loca/static/loca-v2/demos/images/breath_yellow.png',
duration: 4000,
animate: true,
});
// 启动渲染动画
loca.animate.start();
var dat = new Loca.Dat();
dat.addLayer(scatter, ' 贴地');
dat.addLayer(breathRed, '红色');
dat.addLayer(breathYellow, '黄色');