Skip to content

Showcase

The showcase is not a benchmark. It puts the package where it will actually run, under a map, inside a gesture, on a JS thread that also has to animate. It shows what a hexagonal grid buys you once it is cheap. The grid follows the viewport, a drill-down costs one call, a neighbourhood grows ring by ring, a million points fold into a few hundred cells, and a track is stored as cells instead of coordinates.

A readout in every act watches the JS thread and reports the longest block of the run, making the true cost of every step visible.

gridDisk · gridDiskDistances · cellToParent · cellsToBoundaries

A grid that picks its resolution from the zoom and rebuilds while you pinch, at most every 120 ms, then once more where the map settles. Each cell is coloured by its ring distance inside its parent. This act takes the classic path, cell boundaries as a GeoJSON string for the map layer, and the panel shows what that string costs next to the JS thread readout.

Derive spatial layers directly from the viewport.

Coverage layers, pricing zones, service areas, cells instead of polygons.

cellToChildren · cellToParent

Tap a cell and it splits into its seven children. Long-press and they fold back into the parent. Every split is one call, so the detail follows your finger.

Drill down where the data is dense.

Drill-down analytics, adaptive detail, a resolution per region.

gridRing · gridDisk

Drag the slider to grow the neighbourhood up to 50 rings (7,651 cells). Each ring is computed once and kept, so the slider never waits for a ring it already has.

Run proximity queries without heavy geometry.

Everything within n cells, widening search radius, buffers.

latLngsToCells

Up to a million noisy points are binned into cells in a single batch call, at 100,000 or 1,000,000 points. The map draws a few hundred hexagons instead of a million overlapping markers.

Aggregate heavy data before it hits the map.

Density maps, hotspot detection, event aggregation, telemetry.

latLngToCell · gridPathCells

A fast-forwarded GPS track where every fix is snapped to a cell. If the signal drops, the package computes the missing cells and bridges the gap.

Track continuous movement without storing raw coordinates.

Movement analytics, visited areas, data minimisation, privacy by resolution.