expandGeoSugar
expandGeoSugar(
node,key):SugarError|ExpandResult
Defined in: packages/core/src/model/sugar.ts:346
Expand one authored sugar node into the GeoJSON it stands for.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
node | unknown | the authored sugar value (the location/locations/region/ route content, not the enclosing source). For Astro’s richer nodes, pass project(node) first (R4). |
key | "location" | "locations" | "region" | "route" | which sugar node is, from detectSugarKey. |
Returns
Section titled “Returns”an ExpandResult on success, or a SugarError for
structural malformation or an unknown key. Never throws; never mutates
node; expanding the same node twice is deep-equal.