Skip to content
Design System
GitHub

An outdoor map in latitude and longitude, in SVG with no map library: your own raster tiles or a grid, robots with GPS fix, geofences, routes, pan and zoom, a goal, and GeoMapList as text.

Solar farm

Arrow keys move the map, plus and minus zoom, 0 shows all robots. The robot list beside the map has the same robots as text. 4 robots.

Patrol

Install
npx shadcn add @syncrobotic/geo-map

Also installs: lucide-react@^1, @syncrobotic/cn, @syncrobotic/status-glyph, @syncrobotic/skeleton, @syncrobotic/button, @syncrobotic/button-group, @syncrobotic/robot-icons, @syncrobotic/viewport-overlay, @syncrobotic/empty-state, @syncrobotic/math, @syncrobotic/use-reduced-motion, @syncrobotic/format-number

Overview

When to use

  • A patrol, farm or delivery fleet on satellite positioning: where each robot is, how good its fix is, and whether it is inside its work area.
  • A robot that is offline or air-gapped: the grid in degrees needs no tile server.
  • Sending a robot to a place on the map (Nav2's GPS waypoints, a GeoPoseStamped goal).

Use something else

  • A site's floor plan in metres, indoors: Robot map.
  • Vector tiles, search, routing on roads, or a site across the antimeridian: a map library.
  • One robot's position as a value: a Metric card with its coordinates in words.

More examples

States and real uses. Each example is also a Storybook story and a visual regression test.

Selected

Tiles

Fix quality

Goal mode

Goal without confirm

Empty

Loading

Error

Usage rules

  • For robots that work outside on satellite positioning (patrol, agriculture, delivery), in latitude and longitude. A site's floor plan in metres, indoors, is robot-map.
  • Offer GeoMapList beside every GeoMap, as a chart offers its table: a Map / List switch, or the two side by side on a wide screen. The map is one Tab stop; the list is where each robot and its coordinates are reached by keyboard and screen reader.
  • Bring your own tile server: pass its {z}/{x}/{y} template as tileUrl and its licence's words as attribution. OpenStreetMap's public tile servers forbid heavy use and apps that do not identify themselves; never ship them as a default. Choose a dark style for the dark theme.
  • Without tileUrl the map draws a coordinate grid in degrees and needs no network, for robots and control rooms that are offline or air-gapped. If every tile fails, it falls back to the grid and says so.
  • Robots are their status shape and name, as on robot-map; colour and the status word only for a robot that needs someone.
  • Each fix is words (RTK fixed, GPS fix · ±3 m, No fix), with accuracy as a grey circle once larger than the marker. No fix is the one fix in warning, with LocateOff in the list and a dashed marker at its last place.
  • Geofences are outlines, never a fill: the work area dashed grey, a keep-out solid ink and hatched, never red. The route being driven is dashed blue (routeActive), the one blue on the map; a route not yet sent and the trails are grey.
  • Goal mode asks before it sends: a click places the goal (a drag points it) and a card shows its coordinates, Send and Cancel. Enter places and sends from the keyboard.
  • A goal in a keep-out or outside the work area cannot be sent: Send is disabled with the reason beside it (Inside Pond, a keep-out area), and Enter only says it. confirmGoal={false} sends on release, as robot-map does, except where it cannot be sent.
  • Bottom left holds zoom, the scale bar (m or km at the view's latitude) and the attribution, so the emergency stop keeps the bottom right. The map is north up: no north arrow.
  • Up to a few hundred robots, fences and route points; everything is redrawn on each pan. Vector tiles, a site that crosses the antimeridian, or a globe belong to a map library.

Changelog

  • 0.64.02026-12-01Formatted with Prettier (class order sorted); the code is unchanged.
  • 0.53.02026-11-27Its doc opens with its description, word for word; the code is unchanged.
  • 0.52.02026-11-27Uses the shared helper instead of its own copy; behaviour unchanged.

How to upgrade