首页 / 浏览问题 / WebGIS / 问题详情
SuperMap iClient3D for Cesium轨迹运动完回到第一个点
13EXP 2023年05月04日

用entity加载了轨迹线,轨迹运动完之后如何再让图标回到第一个点位

 

1个回答

您好,请问是指运动过程的轨迹图标回到起点吗?

已知轨迹路线,第一种,可以将路线中的起点坐标再添加到轨迹路线数组中;第二种,添加场景监听事件monitorEvent(),

viewer.scene.postRender.addEventListener(monitorEvent);当entity停止后,移除entity,再添加新的位置为起点坐标的entity,判断point为空时可知entity不再改变位置,已到达终点,point = carrProperty.getValue(viewer.clock.currentTime);   if (point == undefined) {},完成后再移除监听事件viewer.scene.postRender.removeEventListener(monitorEvent);
1,865EXP 2023年05月04日
...