对前端感兴趣,立志成为一名优秀的全栈工程师。
我的常用邮箱 [email protected]
I am interested in front-end development and aspire to become an excellent full-stack engineer.
My regular email is [email protected].
CesiumJS 的扩展库,提供事件订阅、大数据geojson加载、geojson样式、tooltip、popup、缩放控制、绘图工具、测量工具、双屏联动、指南针、热力图等功能
Home Page: https://extends.opendde.com/
License: MIT License
对前端感兴趣,立志成为一名优秀的全栈工程师。
我的常用邮箱 [email protected]
I am interested in front-end development and aspire to become an excellent full-stack engineer.
My regular email is [email protected].
如果模型和地形同时存在画线等的时候应该是直接按照模型就取点了,可能有些点在模型上有些点在地形上,这种怎么处理呢
cesium_drawer = initCesiumDrawer(cesium_viewer, {
tips: {
init: "点击绘制",
start: "左键添加点,右键移除点,双击结束绘制",
},
terrain: true,
// model: true,
});
1.当只开启地形时,在地形还有3dtiles上均可以画线和面,但是画点时高度居然是0
2.当同时开启地形和模型时,只可以在3dtiles上绘制点线面,但是在3dtiles外无法绘制,点会漂移,画线和画面时,均不会渲染,但是回调函数里有点位值
如能将1中的点的高度问题解决,不胜感激
赞一个
没有discussion,只能发issue里了
没文档看用不了啦 : (
您好,我在使用AreaMeasure类时,在获取指定多边形的不贴地面积时,存在结果值断层现象,返回的面积数值并不是连续的。
下面是结果的输出日志片段,可以看到面积的变化不是连续的,而距离的变化是连续的,请问下这是正常的吗?
然后我发现,求取贴地面积时是不存在该问题的。
debug -> area = 0 distance = 114.94096369050939
debug -> area = 0 distance = 114.40292122282816
debug -> area = 0 distance = 114.29155612859823
debug -> area = 57.3385744447367 distance = 113.91566365454422
debug -> area = 57.3385744447367 distance = 113.61148660563786
debug -> area = 57.3385744447367 distance = 113.15645898681481
debug -> area = 57.3385744447367 distance = 113.19140790862978
debug -> area = 57.3385744447367 distance = 113.87060991727348
debug -> area = 57.3385744447367 distance = 114.27065354361112
debug -> area = 57.3385744447367 distance = 114.86389836420538
debug -> area = 0 distance = 116.0148853338321
debug -> area = 0 distance = 116.91646446963539
debug -> area = 0 distance = 117.3215451846528
debug -> area = 0 distance = 117.2650783536708
debug -> area = 0 distance = 117.21050643639211
public static GetArea(viewer: Cesium.Viewer, positions: Cesium.Cartesian3[]): number {
let areaMeasure = new AreaMeasure(viewer);
return areaMeasure.getArea(positions);
}
请问在贴地面积量算过程中,为什么将Cartesian3转换到屏幕坐标再进行采样,创建泰森多边形?这样的话当相机变化时,结果不是会改变吗?
/**
* 计算贴地的多边形面积
* @param {Cartesian3[]} positions 点位
* @returns {number} 面积/平方米
*/
function calcArea(positions: Cartesian3[]): number {
return calculateSurfaceArea(
positions.map((item) => Cesium.SceneTransforms.wgs84ToWindowCoordinates(viewer.scene, item)),
);
const areaSurfaceMeasure = new AreaSurfaceMeasure(this.viewer, { units: "kilometers", labelStyle: { font: "14px sans-serif", fillColor: Color.YELLOW, outlineWidth: 2, style: LabelStyle.FILL_AND_OUTLINE, pixelOffset: new Cartesian2(0, -30), heightReference: HeightReference.CLAMP_TO_GROUND, }, }); areaSurfaceMeasure.start();
报错信息为Height reference is not supported without a scene and globe.
去掉heightReference 就不会报错了
Height reference is not supported without a scene and globe.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.