当前位置:网站首页>Cesium loading display thermal diagram
Cesium loading display thermal diagram
2022-06-25 04:04:00 【Wang +v】
Cesium Load and display the heat map
I'm a little white , So far, for 3D I don't know anything about , So , about cesium It is not particularly good to use , Not at all , So we are also groping bit by bit , In the process of learning bit by bit , So some blog posts may not be accurate , Just to record the learning process , Wrong don't spray me !!
CesiumHeatmap
First of all , A tool is needed to draw a heat map , Is the use of CesiumHeatmap This tool , so what , Here is one of his github The address of .
CesiumHeatmap 【 Time and space gate ~ sou ~】

Just download it and put it in the project .
I put him in here .

Then introduce it into the project .
<script src="./CesiumHeatmap/CesiumHeatmap.js"></script>
Write a case
// Test thermodynamic diagram
function addHeatMap() {
let bounds = {
west: 106.243911,
east: 106.270811,
south: 29.244545,
north: 29.289995,
};
let heatMap = CesiumHeatmap.create(
viewer, // your cesium viewer
bounds, // bounds for heatmap layer
{
// heatmap.js options go here
// maxOpacity: 0.3
gradient: {
// the gradient used if not given in the heatmap options object
'.3': '#d9e7fc',
'.65': '#2a7aed',
'.8': '#fbd801',
'.95': '#18c3a1'
},
},
);
let data = [
{
x: 106.254153, y: 29.2883939, value: 76 },
{
x: 106.2654284, y: 29.2854935, value: 63 },
{
x: 106.265005, y: 29.284573, value: 1 },
{
x: 106.264001, y: 29.283456, value: 21 },
{
x: 106.263219, y: 29.282181, value: 28 },
{
x: 106.262788, y: 29.279673, value: 41 },
{
x: 106.2632087, y: 29.2742665, value: 75 },
{
x: 106.2505158, y: 29.28138, value: 76 },
{
x: 106.2531094, y: 29.2833591, value: 100 },
{
x: 106.2531093, y: 29.2844560, value: 80 },
{
x: 106.253293, y: 29.284826, value: 1 },
{
x: 106.250099, y: 29.285638, value: 21 },
{
x: 106.2469149, y: 29.2864109, value: 28 },
{
x: 106.254119, y: 29.276274, value: 41 },
];
let valueMin = 0;
let valueMax = 50;
heatMap.setWGS84Data(valueMin, valueMax, data);
viewer.camera.flyTo({
destination: Cesium.Cartesian3.fromDegrees(106.254153, 29.2742665, 2e3),
orientation: {
heading: Cesium.Math.toRadians(0.0),
pitch: Cesium.Math.toRadians(-90.0),
roll: 0.0,
},
});
}
The effect is like this .

边栏推荐
- Oracle-sqlload import external data details
- Work assessment of pharmaceutical polymer materials of Jilin University in March of the 22nd spring -00025
- Crawl Sina Weibo fans
- Monitoring pancakeswap new token
- Lao Ye's blessing
- Lu Qi invests in quantum computing for the first time
- cesium 图形标注圆形、正方形、多边形、椭圆等
- zabbix的安装避坑指南
- Hello CTP (V) -- CTP position calculation
- Redis related-03
猜你喜欢

The era of copilot free is over! The official version is 67 yuan / month, and the student party and the defenders of popular open source projects can prostitute for nothing

About PLSQL error initialization failure

Do you really need automated testing?

2022-06-21-flink-49 (I. SQL manual)

Redis related-02

How to quickly deliver high-value software

代表多样性的彩色 NFT 系列上线 The Sandbox 市场平台

Hello CTP (II) -- Introduction to CTP

严重的PHP缺陷可导致QNAP NAS 设备遭RCE攻击

居家办公之后才明白的时间管理 | 社区征文
随机推荐
Crawler crawls Sina Weibo data
“语法糖”——我的编程新知
redis
Crawl Sina Weibo fans
The programmer reality show is coming again! Hulan, as the host, carried the lamp to fill the knowledge. The SSS boss had a bachelor's degree in pharmacy. Zhu Jun and Zhang Min from Tsinghua joined th
Sun Wu plays Warcraft? There is a picture and a truth
Mobile mall project operation
Windows 2003 64 bit system PHP running error: 1% is not a valid Win32 Application
DevEco Studio 3.0编辑器配置技巧篇
Solution to the problem that Linux crontab timed operation Oracle does not execute (crontab environment variable problem)
Hello CTP (III) - CTP quotation API
Qt编译数据库插件通用步骤说明
JS tool function, self encapsulating a throttling function
Development of trading system (XII) - Official quickfix document
Peking University has a new president! Gongqihuang, academician of the Chinese Academy of Sciences, took over and was admitted to the Physics Department of Peking University at the age of 15
(ultra detailed onenet TCP protocol access) arduino+esp8266-01s accesses the Internet of things platform, uploads real-time collected data /tcp transparent transmission (and how to obtain and write Lu
Hello CTP (II) -- Introduction to CTP
威马招股书拆解:电动竞争已结束,智能排位赛刚开始
Development of trading system (VIII) -- Construction of low delay network
PHP代码审计2—这些函数必知必会