前言
cesium 官網的api文檔介紹地址cesium官網api,里面詳細的介紹 cesium 各個類的介紹,還有就是在線例子:cesium 官網在線例子,這個也是學習 cesium 的好素材。
內容概覽
1.基於cesium 實現圓圈警戒掃描
2.源代碼 demo 下載
本篇實現 cesium 雷達掃描功能,效果圖如下:
實現思路:核心引用 cesium PostProcessStage 類
- 核心代碼
/* 添加掃描線 depth關閉 lon:-74.01296152309055 lat:40.70524201566827 height:129.14366696393927 viewer cartographicCenter 掃描中心 maxRadius 最大半徑 米 scanColor 掃描顏色 duration 持續時間 毫秒 */ function AddCircleScanPostStage(viewer, cartographicCenter, maxRadius, scanColor, duration) { var ScanSegmentShader = "uniform sampler2D colorTexture;\n" + "uniform sampler2D depthTexture;\n" + "varying vec2 v_textureCoordinates;\n" + "uniform vec4 u_scanCenterEC;\n" + "uniform vec3 u_scanPlaneNormalEC;\n" + "uniform float u_radius;\n" + "uniform vec4 u_scanColor;\n" + "vec4 toEye(in vec2 uv, in float depth)\n" + ……
更多詳情見下面鏈接文章:
GIS之家小專欄此文章:cesium 圓圈警戒掃描(附源碼下載)
文章提供源碼,對本專欄感興趣的話,可以關注一波

