* @deprecated 由 upsertLink 取代,保留仅供外部可能调用的场景兼容。 * 直接新建一个 polyline 实体(不索引,不复用)。
(from, to, color)
| 953 | * 直接新建一个 polyline 实体(不索引,不复用)。 |
| 954 | */ |
| 955 | drawLink(from, to, color) { |
| 956 | this.viewer.entities.add({ |
| 957 | polyline: { |
| 958 | positions: [ |
| 959 | this.toCartesian(from.lon, from.lat, from.alt || 0), |
| 960 | this.toCartesian(to.lon, to.lat, to.alt || 0), |
| 961 | ], |
| 962 | width: 2.5, |
| 963 | material: color, |
| 964 | }, |
| 965 | }); |
| 966 | }, |
| 967 | |
| 968 | /** |
| 969 | * @deprecated 由 updateRequestLinks 取代。 |