Skip to content

featureGroup

featureGroup<F>(features, projection, accessors): (g) => void

Defined in: geo/project.ts:46

A Scene.group builder that projects each GeoJSON feature ONCE with projection (via geoPath into the drawable’s PathContext) and registers it as a drawable. After this, the GPU renders, recolors, and pans/zooms without re-projecting.

Winding matters: geoPath fills on the sphere, so a ring’s orientation selects the region it encloses. Wind exterior rings CLOCKWISE in [lon, lat] (latitude up; i.e. negative signed area, like makeCells/makeDemoPolygon). A ring wound COUNTER-clockwise is treated as its complement (the whole sphere minus the region) and projects to a giant, map-covering polygon — if every polygon renders as one solid fill covering the map, your rings are wound the wrong way. (Holes: opposite winding to their exterior.) See also AGENTS.md “GeoJSON winding”.

F extends GeoInput

readonly F[]

GeoProjection

FeatureAccessors<F>

(g) => void