High Command's dark/light basemap style over OpenFreeMap (free, keyless, worldwide) or a self-hosted Overture PMTiles archive; curated place labels; provider adapters.
$ npx shadcn@latest add @highcommand/basemapCopies the source into your project and pulls in what it needs. First time? Add the registry to components.json.
createBasemapStyle(opts: BasemapStyleOptions): StyleSpecificationHigh Command's basemap style (dark or light) over either tile schema.
haversineKm(a: { lat: number; lng: number; }, b: { lat: number; lng: number; }): numberGreat-circle distance in km.
networkPlaces(tenant: readonly TenantPlace[], opts?: { matchKm?: number | undefined; curated?: readonly CuratedPlace[] | undefined; }): PlaceLabel[]Curated places plus the tenant's own. A tenant place within `matchKm` of a curated one is that place (the curated name and kind win, and it is promoted to at least tier 2); otherwise it becomes its own label (tier 2 for a site or a shipment end, tier 3 for an account address), nearby tenant places of the same name collapsing into one.
placeLabelsGeoJSON(labels: readonly PlaceLabel[]): { type: "FeatureCollection"; features: { type: "Feature"; properties: { code?: string | undefined; name: string; kind: PlaceKind; tier: PlaceTier; tenant: boolean; minzoom: number; rank:…The labels as GeoJSON points, ready for a MapLibre source. `rank` orders collisions: lower wins (tenant first, then tier).
countryLabelsGeoJSON(countries?: readonly CountryLabel[]): { type: "FeatureCollection"; features: { type: "Feature"; properties: { name: string; }; geometry: { type: "Point"; coordinates: [number, number]; }; }[]; }Country names as GeoJSON points for a MapLibre source (default: the built-in COUNTRY_LABELS).
registerPmtilesProtocol(maplibre: MaplibreLike): ProtocolRegisters the `pmtiles://` protocol with maplibre-gl once; returns the shared Protocol instance.
openFreeMap(opts?: { tilesUrl?: string | undefined; buildings?: boolean | undefined; }): BasemapProviderThe default: OpenFreeMap's planet (OpenMapTiles schema) in High Command's palette. Free, no key, no sign-up, worldwide; provided as-is with no SLA, so a production app with heavy traffic should self-host (OpenFreeMap publishes its whole stack) or use another OpenMapTiles host.
selfHostedPmtiles(url: string, opts?: { buildings?: boolean | undefined; schema?: BasemapSchema | undefined; }): BasemapProviderOne PMTiles file served by your own app over HTTP range requests (the kit's /api/tiles/[file] route); works offline. `schema` is the archive's: High Command's own Overture build ("overture", the default here) or an OpenMapTiles build (planetiler, OpenFreeMap's).
vectorTileProvider(cfg: VectorTileProviderConfig): BasemapProviderCommercial provider adapter (URL + key from your server config). With `styleUrl`, the vendor style is used as-is (light/dark via the {theme} placeholder). With `tilesUrl`, High Command's own styles are drawn over the vendor's tiles - only valid if the vendor serves the OpenMapTiles schema (most do) or High Command's Overture schema; otherwise use `styleUrl`.
Install this free piece now; the Pro pieces drop in on top of it, in the same app. Pro is $79 once.