One coverage question, three connected views. Filter synthetic dealers, inspect the map, and compare the service load across regions.
OPTIONAL / LOCAL RECORDING PREPARATION
Prepare a take. Keep the person's settings.
Confirming a scene creates a memory-only route and table. The first checkpoint survives repeated resets; saved geographic, table and appearance preferences stay untouched. This does not start screen capture. Presentation views only reframe the same live data; they never reset the query or load the SDK. An already-loaded public map may redraw tiles when its viewport changes.
Normal demo. No recording checkpoint exists. Reload resumes saved preferences; an in-memory checkpoint cannot survive it.
A reset/restore pauses the optional map and never loads the SDK or moves its camera. If a previous map view exists, restoring its camera/layers is a separate explicit action that may request public tiles. Pending query/fixture work is invalidated or cancelled, never replayed.
Search, sort, filter, paginate and select records without using the map. The selected record appears below; DataTables preferences are saved separately for this route and table.
A bounded fixture imitates a service with a 17-feature transfer limit. The adapter enumerates IDs, retrieves batches, splits truncated batches and rejects incomplete results.
Deterministic fixture. No external feature service is queried.
Shared synthetic data is bundled with the Lab. ArcGIS renders a client-side FeatureLayer. Public raster tiles provide context and retain Esri attribution. Filter timing is a measured browser operation, not a production benchmark.
There is no hosted feature service, scheduled data pipeline, paid routing, or production access in this demonstration. Hosting, update and rollback architecture are explained in the tutorial.
These short excerpts connect the lab’s behavior to its implementation. Each example links to the full tutorial step for its context, tradeoffs and checkpoint. Names and dependencies belong to that source; the excerpts are not standalone programs.
Example 01 · Tutorial excerpt
Describe a location before drawing it
Objective and prerequisites. Start from the existing Zyel repository, preserve the Celebration route, and work on an isolated branch. Start from the reviewed Lab checkout or its explicitly supplied committed reference, which must contain this demo and lab/tools/serve.mjs . The draft package can precede its merge into the default branch. The file preflight below stops before creating a worktree if the selected commit lacks either asset. Uncommitted owner edits are preserved in the original checkout and are not copied to a new worktree. You also need a supported Node.js runtime for tests and a local HTTP server for browser modules. No ArcGIS account, API key or database is needed for this fixture.
// One row from the shared contract; values shown here are illustrative.
{
id: 'D001', name: 'Synthetic Dealer 01', city: 'Atlanta',
state: 'GA', region: 'Georgia', lat: 33.749, lon: -84.388,
tickets: 12, revenue: 48000, status: 'Active'
}
// ArcGIS uses its own numeric object ID; keep the business ID too.
const sourceFeatures = dealers.map(toFeature);
Objective and prerequisites. Save a person's geographic filters, layer visibility and view extent on this device. Start with the shared createStore() module and the contract from step 1. Persist preferences only; records and selected business details stay in memory.
const defaultState = {
filters: {...DEFAULT_FILTERS}, extent: null,
pointsVisible: true, basemapVisible: true
};
const store = createStore('territory:preferences', defaultState,
value => Boolean(normalizePreferences(value, regions, statuses)));
let state = store.get();
store.set(state);
Objective and prerequisites. Combine attribute filters with either a radius or captured map extent. You need the WGS84 fixture and pure functions; the map is optional at this stage.
const matches = filterDealers(dealers, {
region: 'all', status: 'all', mode: 'radius',
centerLat: 33.749, centerLon: -84.388, radiusKm: 150
}, null);
// The actual implementation also composes region/status predicates.
if (filters.mode === 'radius' &&
distanceKm(center, row) > filters.radiusKm) return false;
Objective and prerequisites. Keep the map, searchable DataTable and regional comparisons consistent. The shared table helper, accepted query result and stable ID maps from earlier steps must be available. In this focused integration excerpt, table , matches and renderComparisons() are the local collaborators. objectIdByDealer maps the source features' business IDs to their positive integer ObjectIDs. Initialize mapContext as undefined and mapPaused as false; set the context only after step 4 obtains its layer view, and pause it while a recording scene retains the hidden map.
table = await createTable({
element: document.getElementById('dealer-table'),
tableId: 'territory-dealers', columns, data: matches,
onSelect: selectRecord
});
function renderResult(rows) {
matches = rows;
table?.replace(matches);
renderComparisons();
if (mapContext && !mapPaused) {
// IDs are looked up in the validated fixture, never user SQL.
const ids = matches.map(d => objectIdByDealer.get(String(d.id)))
.filter(id => Number.isSafeInteger(id) && id > 0);
mapContext.layerView.filter = {where: ids.length
? `ObjectID IN (${ids.join(',')})` : '1=0'};
}
}
Objective and prerequisites. Establish reproducible evidence without inventing throughput or scale claims. You need the local fixture, Node.js, the browser preview and the delivered test scripts.
node --test lab/territory/tests/spatial.test.mjs
node --check lab/territory/app.mjs
node lab/territory/benchmark.mjs
# Browser: test /lab/territory/ at desktop and narrow widths.
# Verify both the normal network and an unavailable ArcGIS CDN.