Map explorer

A React block (a whole screen) in Beamline's Hotel & restaurant app.

A map with one operational layer over real ground (an optional map base: relief, lakes, streams, woods, roads), explored without losing your place; its key counts each kind of feature. A feature's details by the feature or docked at the side (fields in the layer's order, a value never recorded said, never 0; loading, a failure with Retry, and a feature removed since the map loaded each said; several features at one spot offered as a list first), the same feature ringed on the map and its row lit in a table of the layer or the selection, sortable, with arrow keys moving the selection. A filter edited in query-builder is a draft previewed by dimming what it leaves out (how many match, nothing matching and a number field given text said), then applied here or applied and saved to the map; Cancel restores the filter in use and the map's look together; a refused save keeps it applied here. The basemap changes only the ground: layers, filter and selection stay; tiles that fail keep the one shown and say so; an unavailable basemap says why; the opening basemap can be gone back to.

Use it for

  • Inspecting and filtering features on a map layer (sites, assets, stations, summits) beside their table.
  • Trying a filter on a map before saving it, with a clear way back.

Not for

Anatomy

  • map: the ground in the chosen basemap (with a map base: real relief, lakes, streams, woods and roads, painted by the basemap), trails, features (summits and huts) with names (a hut's beside it), the selected ring, dimmed features, the attribution with the base's credit, Show or Hide table, the details anchored by the feature
  • table: Rows (all in layer or selected), sortable columns, rows with the selected one lit and dimmed ones faded
  • panel: Details (docked; anchored, the key: each kind of feature with its count, and the trails), Filter (query-builder, preview, Cancel, Apply, Apply and save) or Basemap (cards with swatches, Back to the opening one)

States

  • details: loading, anchored, docked, several at one spot, removed since loading, failed with Retry, no selection
  • table: layer, selection, sorted
  • filter: none, draft, previewing, matching with the rest dimmed, no matches, invalid value, cancelled, applied here, saved, save refused
  • basemap: the opening one, switching, another chosen, tiles failed, unavailable, back to the opening one
  • narrow room: the map above the table, the panel below

Keyboard

  • Tab reaches each feature on the map (Enter selects) and each table row (arrow keys move the selection); the panel's controls follow

Motion

The details fade in by the feature; features dim and the ground changes colour with a short ease. Nothing runs at rest.

Props

PropTypeDefaultDescription
layer (required)FeatureLayer—
linesMapLine[]—
basemaps (required)Basemap[]—
defaultBasemap (required)string—The basemap the map opens with (Back to it is offered after a change).
defaultFilterQueryGroup—The filter saved with the map.
onLoadFeature (required)(layerId: string, featureId: string) => Promise<Record<string, string | number | null> …—Loads a feature's details; resolve null when it's gone, reject when they can't load.
onLoadBasemap((id: string) => Promise<unknown>)—Loads a basemap's tiles; reject to keep the one shown.
onSaveFilter((q: QueryGroup) => Promise<unknown>)—Saves the filter with the map; reject to keep it applied here only.
defaultSelectedstring | null—
defaultDockedboolean—
defaultPanelMapExplorerPanel—
defaultTableboolean—
defaultDraftFilterQueryGroup—
localestring—
classNamestring—Classes on the documented visual root; no override by default.
styleCSSProperties—Inline styles on the documented visual root; no overrides by default.
refRef<HTMLDivElement>—Receives the documented native target or imperative handle; omitted by default.
mapMapBase—Real ground under the layer (a MapBase: relief, lakes, streams, woods, roads); features and lines are then placed in the base's units. Without it a plain drawn ground stands in.

Built from

Dependencies

lucide-react

Import

import { MapExplorer } from "@beamline/map-explorer";

Get it

Map explorer is part of Beamline UI. Install the parts you need in your React app as compiled packages or editable source. Get Beamline · Connect your agent

More in Hotel & restaurant

  • Reservation desk: A front desk's bookings without a room for a night, beside the rooms that could take them: bookings grouped by room type with their stay, party and…
  • Table service: A restaurant table's service in three places sharing one order. The floor: tables placed on a plan by drag, arrow keys or typed numbers (Shift and an…
  • Counter service: A counter and its kitchen. The counter: the order on the left (its name, eat here / takeaway / drive-through, each line with its options and quantity…
  • Room readiness: Housekeeping's rooms for the day: condition, occupancy, the front desk's plan (arriving with its time or not known, departing, staying on), who is…
  • Stay folio: A stay's folio: the chosen folio's lines filtered by kind, posted and pending said, voided lines on request, every row in the ledger's currency; beside…
  • Guest messages: Conversations with guests beside the booking each is about, for a host stand, salon front desk or hotel. Guests waiting for an answer come first with how…
  • Shift briefing: A team's pre-shift briefing for a restaurant service (or any shift with bookings): the venue, the service and when its reservation snapshot was read, an…
  • Page header: The top of a record or project page: breadcrumb, title with status, description and meta, a primary action with secondary actions that fold into a More…
  • Turntable review: A 3D asset reviewed on a turntable. The object large at the angle in view with front, side and back said, standing on a plate whose rim shows the twelve…

Part of Beamline UI: polished, editable React components and complete screens for custom applications. Build your own style from any look; tokens, fonts, radii, motion; not only colours.