blob: b528e47d5cbdee483e0d411719998236b4aafbb5 [file] [log] [blame]
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Airline - ECHARTS-GL</title>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes"> <!-- Fullscreen Landscape on iOS -->
<link rel="stylesheet" href="../common/reset.css">
</head>
<body>
<div id="main"></div>
<script src="../common/echarts.min.js"></script>
<script src="../common/map/js/world-simp.js"></script>
<script src="../common/jquery.min.js"></script>
<script src="../common/echarts-gl.js"></script>
<script src="../data/alcohol.json.js"></script>
<script src="../texture/canyon.hdr.js"></script>
<script>
var chart = echarts.init(document.getElementById('main'));
var regionData = alcoholData.map(function (item) {
return {
name: item[0],
value: item[1]
};
});
chart.setOption({
backgroundColor: '#cdcfd5',
visualMap: {
min: 0,
max: 15,
realtime: true,
calculable : true,
inRange: {
color: ['#313695', '#4575b4', '#74add1', '#abd9e9', '#e0f3f8', '#ffffbf', '#fee090', '#fdae61', '#f46d43', '#d73027', '#a50026']
}
},
series: [{
type: 'map3D',
map: 'world-simp',
shading: 'lambert',
realisticMaterial: {
roughness: 0.2,
metalness: 0
},
postEffect: {
enable: true,
SSAO: {
enable: true,
quality: 'high',
radius: 3,
intensity: 2
}
},
groundPlane: {
show: true
},
light: {
main: {
intensity: 2,
shadow: true,
shadowQuality: 'high',
alpha: 30
},
ambient: {
intensity: 0
},
ambientCubemap: {
texture: canyonUrl,
exposure: 2,
diffuseIntensity: 1
}
},
viewControl: {
distance: 50
},
itemStyle: {
// borderColor: '#222',
// borderWidth: 1
},
label: {
// backgroundColor: '#fff',
textStyle: {
color: 'white'
}
},
debug: {
wireframe: {
show: true,
lineStyle: {
color: '#000',
width: 0.5
}
}
},
boxHeight: 1,
data: regionData
}]
});
window.onresize = chart.resize;
</script>
</body>
</html>