(id: string, data: Path[])
| 110 | |
| 111 | |
| 112 | function newPathLayer(id: string, data: Path[]) { |
| 113 | if (!data) return null; |
| 114 | |
| 115 | return new base.layers.PathLayer<Path>({ |
| 116 | id, |
| 117 | data, |
| 118 | billboard: true, |
| 119 | widthScale: 1, |
| 120 | widthMinPixels: 2, |
| 121 | widthUnits: 'pixels', |
| 122 | coordinateSystem: base.deck.COORDINATE_SYSTEM.CARTESIAN, |
| 123 | getPath: (o) => o.positions, |
| 124 | getColor: (o) => o.strokeColor, |
| 125 | getWidth: (o) => o.strokeWidth, |
| 126 | }); |
| 127 | } |
| 128 | |
| 129 | function newPolygonLayer(id: string, data: Polygon[]) { |
| 130 | if (!data) return null; |