* feat: regions — `…/geo`, LayerHandle.setRegion, confineFeatureLayer
- `@vit-foundation/map/geo` (a leaf): regionShapeOf / loadRegionShape →
RegionShape { bbox, contains }, winding-agnostic (d3's geoContains reads
RFC 7946 rings as their complement), antimeridian-aware (regionBoxes);
anchorOf / anchorOfArcgis, the one rule that decides whether a feature is
inside a region.
- LayerHandle.setRegion(shape | null) / getRegion() on every provider:
ArcGIS filters a points layer's graphics and narrows a GeoJSON layer by
object ids; MapLibre filters the source data by anchor (its `within`
expression keeps only features entirely inside, a different rule); the
fake records the region.
- `…/arcgis` confineFeatureLayer / featureIdsInRegion: narrows a loaded
FeatureLayer to a region server-side by pinning `objectid IN (…)` on its
definitionExpression; restores the original on null.
- Boundary test keeps `src/lib/geo` a leaf. Docs: reference, providers,
README, unreleased changelog.
* fix(regions): one confinement per layer, a paging loop that stops, an honest region contract
From the review of feat/geo-region:
- confinementOf(layer): one object per layer owns the original expression
(re-read after a host edit, restored on null), a query clone so a new
region is looked up without resetting the live layer (no world refetch),
and a generation so the later of two quick calls wins; a failed lookup
keeps the previous region. confineFeatureLayer is shorthand for it.
- pageThrough(): the one paging loop — advances by what was returned, stops
on an empty page, reads one page from a service without pagination
(complete: false), gives up past maxPages. featureIdsInRegion uses it,
orders by object id, and refuses an incomplete result.
- Geometry is generalized only for server-backed line/polygon layers, so a
client-side GeoJSONLayer anchors on the same geometry MapLibre does.
- setRegion on every adapter: superseded calls apply nothing, getRegion()
reports the applied region, MapLibre retries a failed source read; the
fake applies the anchor rule (`drawn`). One contract suite
(helpers/layerRegionContract.ts) runs on ArcGIS, MapLibre and the fake.
- anchorOf: a part crossing ±180° is measured in a 0–360° frame.
* test(geo): a polygon across the antimeridian anchors on itself
* fix(regions): load the query clone before looking a region up
An ArcGIS clone starts unloaded, so its objectIdField is empty: the
lookup asked for no fields and pinned `objectid IN (NaN)`, leaving every
confined service layer empty. Load the clone first, skip non-numeric ids,
and make the test fake's clone start unloaded like the real one. Found by
running the story globe against the live label service.
* chore(release): 0.7.0