@@ -14,7 +14,7 @@ import type { H3HexagonLayerProps } from "@deck.gl/geo-layers";
1414import { H3HexagonLayer } from "@deck.gl/geo-layers" ;
1515import * as arrow from "apache-arrow" ;
1616
17- import { GeoArrowPickingInfo } from "../types" ;
17+ import { ColorAccessor , FloatAccessor , GeoArrowPickingInfo } from "../types" ;
1818import { assignAccessor , extractAccessorsFromProps } from "../utils/utils" ;
1919import { GeoArrowExtraPickingProps , getPickingInfo } from "../utils/picking" ;
2020import { validateAccessors } from "../utils/validate" ;
@@ -25,6 +25,7 @@ export type GeoArrowH3HexagonLayerProps = Omit<
2525 "data" | "getHexagon"
2626> &
2727 _GeoArrowH3HexagonLayerProps &
28+ // Omit<GeoArrowPolygonLayerProps, "getPolygon"> &
2829 CompositeLayerProps ;
2930
3031/** Props added by the GeoArrowH3HexagonLayer */
@@ -36,6 +37,31 @@ type _GeoArrowH3HexagonLayerProps = {
3637 */
3738 getHexagon : arrow . Data < arrow . Utf8 > ;
3839
40+ /** Fill color accessor.
41+ * @default [0, 0, 0, 255]
42+ */
43+ getFillColor ?: ColorAccessor ;
44+
45+ /** Stroke color accessor.
46+ * @default [0, 0, 0, 255]
47+ */
48+ getLineColor ?: ColorAccessor ;
49+
50+ /**
51+ * Line width value of accessor.
52+ * @default 1
53+ */
54+ getLineWidth ?: FloatAccessor ;
55+
56+ /**
57+ * Elevation value of accessor.
58+ *
59+ * Only used if `extruded: true`.
60+ *
61+ * @default 1000
62+ */
63+ getElevation ?: FloatAccessor ;
64+
3965 /**
4066 * If `true`, validate the arrays provided (e.g. chunk lengths)
4167 * @default true
@@ -55,7 +81,9 @@ const ourDefaultProps = {
5581 _validate : true ,
5682} ;
5783
84+ // @ts -expect-error getFillColor
5885const defaultProps : DefaultProps < GeoArrowH3HexagonLayerProps > = {
86+ // ..._polygonDefaultProps,
5987 ..._defaultProps ,
6088 ...ourDefaultProps ,
6189} ;
@@ -90,8 +118,6 @@ export class GeoArrowH3HexagonLayer<
90118 "getHexagon" ,
91119 ] ) ;
92120
93- const hexValues = hexData . values ;
94-
95121 const props : H3HexagonLayerProps = {
96122 // Note: because this is a composite layer and not doing the rendering
97123 // itself, we still have to pass in our defaultProps
@@ -106,8 +132,8 @@ export class GeoArrowH3HexagonLayer<
106132 length : hexData . length ,
107133 attributes : {
108134 getHexagon : {
109- value : hexValues ,
110- // h3 cells should always be 15 characters...?
135+ value : hexData . values ,
136+ // h3 cells should always be 15 characters
111137 size : 15 ,
112138 } ,
113139 } ,
0 commit comments