Repository navigation
Engine v1.0.23
Makes the county dispatcher's "load from the selected point outward" behavior the ENGINE DEFAULT for every layer: a click's card resolves from the geometry nearest the need — the cached full set when it's in memory, otherwise one small "which feature holds this point" spatial query — so a multi-MB boundary download (the rest of the state, the rest of the city) never delays the selected location's answer. The full set keeps downloading behind the card for the overlay, the highlight, and every later click, exactly as before. Ten changed blocks, no new blocks — adopting forks need no fence seeding and nothing outside the fences: every new path is opt-in per loader, and a loader that declares nothing takes the byte-equivalent of its old load-then-contain path.
-
Changed
find-prop-ci: newqueryFeatureAt(load, point)— the one funnel for point-first resolution. Full set cached (load.cached()) → local containment, free. Still downloading and the loader declares.atPoint(point)→ answer from that spatial query, with the full download joined (not raced) in the background. The point query is advisory only: its features still pass the same localpointInGeometrytest, and a failed OR EMPTY point query defers to the full set — "no district here" is only ever concluded from the validated full set, and a card answer can never disagree with what the drawn boundaries would say. Same block, one latent bug fixed:findFeatureContaining's P7 memo is now keyed by feature COUNT as well as point identity, because an incrementally-drawn layer (the county union, a future paged loader) APPENDS into the same live geojson object — a no-match memoized before a late area landed must not veto the rescan that finds the point's own district in the appended features. Latent until now (nothing scanned the union between selection and append); the new overlay-.thenhighlight catch-up exposed it, and the county-dispatch smoke check ("late county appends to the drawing and highlights the selected district") caught it before ship. -
Changed
cached-loaders:makeCachedloaders expose.cached()(the resolved value, or null while unloaded/in flight — without it a query cannot tell "answer locally for free" from "worth a point query").makeCachedLoaderattaches.atPointautomatically, so every Socrata boundary layer in every fork goes point-first with no per-layer wiring. -
Changed
socrata-loader/arcgis-loader: the point-query fetchers —loadSocrataPointGeoJSON(SoQLintersectson the probed geometry column; only the primary route takes$where, and a legacy dataset that nulls geometry there failshasUsableGeometryinto the full-set fallback, so the route-walk machinery keeps owning that failure mode) andloadArcGISPointGeoJSON(pointesriSpatialRelIntersectson any FeatureServer/MapServer layer; optionalwherefor parity with a filtered full load). Both reject on empty for the same honesty reasonqueryFeatureAtre-tests locally. -
Changed
polygon-factory,school-zone-factory,cps-network-factory,chamber-factory: queries route throughqueryFeatureAt. For the chamber factory only the boundary half of thePromise.allchanges — rosters stay whole-file, they are the small half of the join. -
Changed
layer-registry+overlay-cards: the two consequences of a card that can now resolve BEFORE the full geometry. (1) The overlay-load.thenre-runs the highlight pass (and relationship outlines) when the full set lands, so the selected district lights up the moment its layer finishes drawing — the same catch-up the county dispatcher'sdrawAppendedCountyFeaturesdoes when a late county arrives. (2) A newrt.resultSeqrecords the selection whose verified result the card currently shows; the overlay-load.catchno longer replaces such a card with the boundaries error (the answer outranks the drawing — the same recorded tradeoff the county dispatcher makes for a failed county: card/query keeps working, the overlay waits for a reload). Both were dead paths before this release, because query and overlay rode one promise and could not diverge.
Fork adoption is a clean bump. No METRO variable is required, no generator output shape changed, and with no .atPoint declared anywhere a fork's behavior is unchanged to the user. Turning the speed on for a fork's own heavy loaders is one line each, entirely outside the engine: myLoader.atPoint = function (point) { return loadArcGISPointGeoJSON(layerUrl, point, outFields); }; (Chicago wired its six TIGERweb statewide loaders, the ZCTA layer, CPD's district/beat services, and Cook's commissioner districts this way — the reference patterns are all fork-side in index.html). NYC's paged election-districts loader is the canonical candidate: five serial pages, one point query. One caution from Chicago's own wiring: a loader that STAMPS derived properties onto features at load time (Chicago's suburban municipalWardEntry geometry, with its dx* fields) must NOT get a naive .atPoint — the raw server features lack the stamps its card reads — so its queries stay on the full path deliberately.
Live-verified before shipping (Loop ground-truth point): TIGERweb township point query → 1 correct feature, 133 KB in 0.74 s against the 14.5 MB statewide download; Socrata ward intersects → 1 feature, same properties as the full route; Cook County GIS commissioner districts → 1 feature, district 2. Same layer, same outFields, same property schema either way — hover/card parity holds because both read the same fields.