@@ -5,23 +5,17 @@ import {
55 GetPickingInfoParams ,
66 Layer ,
77 LayersList ,
8+ assert ,
89} from "@deck.gl/core/typed" ;
910import { ArcLayer } from "@deck.gl/layers/typed" ;
1011import type { ArcLayerProps } from "@deck.gl/layers/typed" ;
1112import * as arrow from "apache-arrow" ;
12- import {
13- assignAccessor ,
14- extractAccessorsFromProps ,
15- getPointChild ,
16- } from "./utils.js" ;
13+ import * as ga from "@geoarrow/geoarrow-js" ;
14+ import { assignAccessor , extractAccessorsFromProps } from "./utils.js" ;
15+ import { child } from "@geoarrow/geoarrow-js" ;
1716import { getPickingInfo } from "./picking.js" ;
18- import {
19- ColorAccessor ,
20- FloatAccessor ,
21- GeoArrowPickingInfo ,
22- PointVector ,
23- } from "./types.js" ;
24- import { validateAccessors , validatePointType } from "./validate.js" ;
17+ import { ColorAccessor , FloatAccessor , GeoArrowPickingInfo } from "./types.js" ;
18+ import { validateAccessors } from "./validate.js" ;
2519
2620/** All properties supported by GeoArrowArcLayer */
2721export type GeoArrowArcLayerProps = Omit <
@@ -45,12 +39,12 @@ type _GeoArrowArcLayerProps = {
4539 /**
4640 * Method called to retrieve the source position of each object.
4741 */
48- getSourcePosition : PointVector ;
42+ getSourcePosition : ga . vector . PointVector ;
4943
5044 /**
5145 * Method called to retrieve the target position of each object.
5246 */
53- getTargetPosition : PointVector ;
47+ getTargetPosition : ga . vector . PointVector ;
5448
5549 /**
5650 * The rgba color is in the format of `[r, g, b, [a]]`.
@@ -133,8 +127,8 @@ export class GeoArrowArcLayer<
133127
134128 // Note: below we iterate over table batches anyways, so this layer won't
135129 // work as-is if data/table is null
136- validatePointType ( sourcePosition . type ) ;
137- validatePointType ( targetPosition . type ) ;
130+ assert ( ga . vector . isPointVector ( sourcePosition ) ) ;
131+ assert ( ga . vector . isPointVector ( targetPosition ) ) ;
138132 }
139133
140134 // Exclude manually-set accessors
@@ -150,9 +144,9 @@ export class GeoArrowArcLayer<
150144 recordBatchIdx ++
151145 ) {
152146 const sourceData = sourcePosition . data [ recordBatchIdx ] ;
153- const sourceValues = getPointChild ( sourceData ) . values ;
147+ const sourceValues = child . getPointChild ( sourceData ) . values ;
154148 const targetData = targetPosition . data [ recordBatchIdx ] ;
155- const targetValues = getPointChild ( targetData ) . values ;
149+ const targetValues = child . getPointChild ( targetData ) . values ;
156150
157151 const props : ArcLayerProps = {
158152 // Note: because this is a composite layer and not doing the rendering
0 commit comments