| | |
| | | outlineWidth: number, |
| | | [key: string]: any |
| | | } |
| | | interface polyline { |
| | | width?: number |
| | | material?: Cesium.Color |
| | | [key: string]: any |
| | | } |
| | | interface pointOption { |
| | | longitude: number |
| | | latitude: number |
| | | point?: pointSetting |
| | | billboard?: billboardSetting |
| | | polyline?: polyline |
| | | label?: labelSetting |
| | | id?: string |
| | | heading?: number |
| | |
| | | }) |
| | | } |
| | | |
| | | // 添加线段 |
| | | const addPolyline = (pointOption: pointOption) => { |
| | | viewer?.entities.add({ |
| | | polyline: pointOption.polyline, |
| | | id: pointOption.id, |
| | | }) |
| | | } |
| | | |
| | | // 通过点ID删除 |
| | | function removeById (id:string) { |
| | | viewer?.entities.removeById(id) |
| | |
| | | roadPattern, |
| | | patternMap, |
| | | getEntityById, |
| | | updateEntityPosition |
| | | updateEntityPosition, |
| | | addPolyline |
| | | } |
| | | } |