High Command
LibraryTemplatesGet startedPricing
Get Pro · $79

Guide

Browse everythingGetting startedThemingYour data

Site

HomeTemplatesPricingChangelog

Templates 4

Command centerProFleetProCustomer trackingProField servicePro

Ops and shell 9

App shellProOps modelProAttention queueProMorning briefProShift handoverProLane panelProOwn-fleet partsProAgent action barProCustomizable dashboardPro

Map 17

PMTiles basemapPMTiles routeTrip hologramProBasemap styleMap geometryMapLand texture and dot lensProException heatmap and risk contoursProLane arcsProShipment layerOwn fleet layerProFleet map layersCurated place labels and sitesRoute traceEdge chipsProMap key, filters and paddingMap kitPro

Time and trips 11

Time and trip modelsEvent fieldProIn-transit rowsProImpact lineProActivity barProReplay clockTime controlPlayback overlayProTrip timetableProStage rowWeek cursorPro

Figures, charts and tables 14

Sourced valueKey-figure tileFigure groupPart barBand sparklineKPI stripProChart kitPop barWaterfall cascadeMargin chartsPro13-week cash ladderProWork tableProField railProHorizon gridPro

Zones and dispatch 10

Zones modelDispatch modelProGeofence layerGeofence eventsGeofence drawProService ringsDensity heatmapJob queueProAssign dialogProStop listPro

Design system 3

ThemeShared helpersUI primitives

Routing 3

Offline road routerAustin road graphAustin areas

Libraries 2

Fleet coreRoute core
High Command

Map, fleet and ops-console components for React. Built in-house, copied into your app with the shadcn CLI.

Product

  • Library
  • Templates
  • Pricing
  • Changelog

Build

  • Get started
  • Accessibility
  • Trip hologram

Templates

  • Command center
  • Fleet
  • Field service

New pieces by email. A short note when a release lands.

One email per release. Unsubscribe any time.

© 2026 High Command Pro licenseTermsPrivacyRefundsMap data © OpenStreetMap contributors · OpenFreeMap
Library/Zones and dispatch

Zones model

Pure zone geometry: point in polygon, geodesic circles and service-ring bands, spherical area and its words, centroids, zone features with status, the worst status inside a zone, and enter/exit diffs of a vehicle feed.

Free · MITLibrary@highcommand/zones-lib1 file
See it in context
Click the map to test a pointInsidethe Central service zoneRing band: 2–4 mi of the depotZone area 6.93 mi² · 6 mi ring 113.1 mi² (πr² 113.10)
Customize

Installation

$ npx shadcn@latest add @highcommand/zones-lib

Copies the source into your project and pulls in what it needs (3 other items). First time? Add the registry to components.json.

API

14 functions
  • openRing(ring: readonly LngLat[]): LngLat[]

    Drops a repeated closing point so every vertex is unique.

  • closeRing(ring: readonly LngLat[]): LngLat[]

    Repeats the first point at the end, as GeoJSON polygons require.

  • pointInPolygon([x, y]: LngLat, ring: readonly LngLat[]): boolean

    Ray-casting point in polygon. A point exactly on an edge may go either way.

  • destination([lng, lat]: LngLat, meters: number, bearingDeg: number): LngLat

    The point `meters` from `from` along `bearingDeg` (great circle).

  • circlePolygon(center: LngLat, radiusM: number, steps?: number): LngLat[]

    A geodesic circle as a closed ring: the true radius on the ground, not a screen circle.

  • polygonArea(ring: readonly LngLat[]): number

    Polygon area in square metres on a sphere.

  • areaText(m2: number, unit?: "mi" | "km"): string

    "2.4 mi²", "0.31 km²".

  • polygonCentroid(ring: readonly LngLat[]): LngLat

    Area-weighted centroid (where a city-sized zone's name goes).

  • geofenceFeatures(fences: readonly Geofence[], selectedId?: string | null): Feature[]

    Each zone's polygon and a label point at its centroid. `c` is the status, `off` 1 when inactive, `sel` 1 when selected.

  • ringFeatures(center: LngLat, radii: readonly number[], unit?: "mi" | "km"): Feature[]

    Service-area rings around a hub: one band per radius (each a donut, so stacked bands never double their fill), and a label point at the top of each ring. `band` counts out from 0.

  • zoneStatus(fence: Geofence, points: readonly { p: LngLat; status: StatusColor; }[]): StatusColor

    The zone's status from what is inside it: the worst status of the points in it (its own status when nothing is).

  • diffGeofences(prev: GeofenceMembership | null, vehicles: readonly Tracked[], fences: readonly Geofence[]): { membership: GeofenceMembership; events: GeofenceEvent[]; }

    Point in polygon for every vehicle, diffed against the previous snapshot. The first snapshot (prev null), zones just added and vehicles just appeared seed without events; a vehicle that drops out of the feed emits nothing; inactive zones are skipped.

  • countInside(m: GeofenceMembership): Record<string, number>

    Vehicles inside each zone, by zone id.

  • worstStatus(list: Iterable<StatusColor>): StatusColor

    The worst of the statuses (neutral when there are none).

Dependencies

npm
None beyond React
Builds on
ThemeUI primitivesShared helpers
Used by
Geofence layerGeofence eventsService rings
Pro pieces built on this
Geofence draw ProField service Pro

Install this free piece now; the Pro pieces drop in on top of it, in the same app. Pro is $79 once.

PreviousHorizon gridNext Dispatch model

On this page

PreviewInstallationAPIDependencies