MCPcopy Create free account
hub / github.com/Tong89/smartNode / drawLink

Function drawLink

frontend/app.js:955–966  ·  view source on GitHub ↗

* @deprecated 由 upsertLink 取代,保留仅供外部可能调用的场景兼容。 * 直接新建一个 polyline 实体(不索引,不复用)。

(from, to, color)

Source from the content-addressed store, hash-verified

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 取代。

Callers

nothing calls this directly

Calls 1

addMethod · 0.80

Tested by

no test coverage detected