What is the callback property for cesium polygon in JavaScript?

2026-04-27 23:491阅读0评论SEO教程
  • 内容介绍
  • 文章标签
  • 相关推荐

本文共计137个文字,预计阅读时间需要1分钟。

What is the callback property for cesium polygon in JavaScript?

javascriptvar viewer=new Cesium.Viewer('cesiumContainer');function callback(time, result) { var txf=Math.floor(time.secondsOfDay); if (txf % 2===1) { result=Cesium.Cartesian3.fromDegreesArray([-115.0, 37.0, -115.0, 32.0, -1]); }}

callbackproperty.js

var viewer = new Cesium.Viewer('cesiumContainer'); function callback(time, result) { var txf = Math.floor(time.secondsOfDay); if (txf %2 === 1) { result = Cesium.Cartesian3.fromDegreesArray([-115.0, 37.0, -115.0, 32.0, -107.0, 33.0, -102.0, 31.0, -102.0, 35.0]); } else { result = Cesium.Cartesian3.fromDegreesArray([-116, 37.0, -115.0, 32.0, -107.0, 33.0, -102.0, 31.0, -102.0, 35.0]); } return result; } var hp = new Cesium.CallbackProperty(callback, false); var redPolygon = viewer.entities.add({ name : 'Red polygon on surface', polygon : { hierarchy : hp, material : Cesium.Color.RED } }); viewer.zoomTo(viewer.entities);

What is the callback property for cesium polygon in JavaScript?

本文共计137个文字,预计阅读时间需要1分钟。

What is the callback property for cesium polygon in JavaScript?

javascriptvar viewer=new Cesium.Viewer('cesiumContainer');function callback(time, result) { var txf=Math.floor(time.secondsOfDay); if (txf % 2===1) { result=Cesium.Cartesian3.fromDegreesArray([-115.0, 37.0, -115.0, 32.0, -1]); }}

callbackproperty.js

var viewer = new Cesium.Viewer('cesiumContainer'); function callback(time, result) { var txf = Math.floor(time.secondsOfDay); if (txf %2 === 1) { result = Cesium.Cartesian3.fromDegreesArray([-115.0, 37.0, -115.0, 32.0, -107.0, 33.0, -102.0, 31.0, -102.0, 35.0]); } else { result = Cesium.Cartesian3.fromDegreesArray([-116, 37.0, -115.0, 32.0, -107.0, 33.0, -102.0, 31.0, -102.0, 35.0]); } return result; } var hp = new Cesium.CallbackProperty(callback, false); var redPolygon = viewer.entities.add({ name : 'Red polygon on surface', polygon : { hierarchy : hp, material : Cesium.Color.RED } }); viewer.zoomTo(viewer.entities);

What is the callback property for cesium polygon in JavaScript?