Skip to main content

@mapcairn/core

Map interfaces, pure logic, basemaps and test fakes for MapCairn; no React, no browser globals.

Checked against version 0.2.0. Install it with npm install @mapcairn/core; import from @mapcairn/core.

Entry points​

Ports​

  • ClipboardPort: Copies text.
  • DevicePreferences: Reports device and accessibility preferences, and tells the ui when they change.
  • FeatureQuery: Finds the features that lie inside an area, which a host can often do better than the browser, for example from a server that holds the layers.
  • FeatureSelection: The set of features a person has picked, kept wherever the host likes: in memory, on a server or in its own state.
  • FileOpener: Asks the person to choose a file and reads it as text.
  • FileSaver: Offers a file for the person to keep, as a download.
  • LayerCatalogue: The layers that exist, as definitions, and what is known about getting them.
  • LayerSource: Loads a feed layer's features, on request a feature's detail shapes, and what a tile layer's service says is at a tap.
  • LocationProvider: Finds the user's location.
  • MapAdapter: The map engine, seen from the ui.
  • MapHostElement: The part of an HTML element the map adapters need.
  • MessageCatalogue: Formats text for one language.
  • RoutingProvider: Finds routes and travel-time areas.
  • SearchProvider: Finds places by name.
  • SettingsStore: Remembers settings.
  • SuggestionProvider: Offers places that match text the person has only partly typed.
  • ThemeSource: The operating system's colour scheme, and the place the resolved theme is applied.
  • UrlState: Reads and writes the shareable state in the page address, using the hash and history.replaceState only, so history is never spammed.

Adapters​

Functions​

  • addStop: The stops with stop added at the end.
  • announceAddressError: Says an address lookup failed and what to do next.
  • announceAddressFound: Announced when an address lookup finds the address at a pin.
  • announceAddressNotFound: Announced when an address lookup finds no address at a pin.
  • announceAreaFound: Announced when a reachable area is found: how long it is for, the mode and its size.
  • announceBasemap: Announced when the basemap changes.
  • announceCatalogueChange: One message for one change to the catalogue, in a fixed order: the layers that were turned off, the layers of the link that are not available, how many…
  • announceCoordinateResult: Announced when a search is answered by one pair of coordinates.
  • announceCopied: Announced after an attempt to copy coordinates.
  • announceDetailError: A feature's affected area could not load.
  • announceDetailShown: A feature's affected area is on the map.
  • announceDetent: Announced when the bottom panel moves to a new height.
  • announceDirectionsCleared: Announced when the stops and the route or area are cleared.
  • announceDrawEvent: The message for what the last draw action did, or null when it needs none (a mode change is visible on the switch itself).
  • announceFeatureDeselected: One feature was removed from the selection: "Removed Gauge 4.
  • announceFeaturesDeselected: Several features, or one with no title to give, were removed from the selection.
  • announceFeatureSelected: One feature was added to the selection: "Added Gauge 4.
  • announceFeaturesFound: A tap or the keyboard found several features together, and a list opened to choose one.
  • announceFeaturesSelected: Several features, or one with no title to give, were added to the selection.
  • announceIdentified: The one message for a tap that asked raster layers what is there, said once when every layer has answered or run out of time.
  • announceImageFailed: The map image could not be made.
  • announceImageSaved: The map image was handed to the browser to save.
  • announceLayerCapped: A query layer drew only the first of more features than it shows.
  • announceLayerEmpty: A feed layer loaded with nothing in it, in the layer's own words.
  • announceLayerError: A layer could not load, and what to do next.
  • announceLayerLoaded: A feed layer loaded: "Earthquakes: 43 shown on the map."
  • announceLayerOffline: A layer did not load because the device is offline, and what to do next.
  • announceLayerOn: A tile layer was turned on.
  • announceLayersTurnedBackOn: An undo turned layers that one action had turned off back on.
  • announceLayersTurnedOff: One action turned several layers off, and the interface offers an Undo for a few seconds.
  • announceLayerZoomIn: A layer is too far out to load, in the words of describeZoomIn.
  • announceLayerZoomOut: A layer is too far in to show, in the words of describeZoomOut.
  • announceLocationError: Says why finding the location failed and what to do next.
  • announceLocationFound: Announced when a location fix arrives, with its accuracy in the user's units.
  • announceMeasureTotal: Announces the running total of a measurement: metres for distance, square metres for area.
  • announceNoFeaturesHere: The keyboard route found no feature at the centre of the map.
  • announceNoResults: Announced when a search finds nothing.
  • announceNoSuggestions: Announced when typing finds no suggestion.
  • announceOffline: The words for the device going offline.
  • announcePinCleared: Announced when the pin is removed.
  • announcePinDropped: Announced when a pin is placed, with its coordinates.
  • announceProjection: Announced when the map is switched between flat and globe.
  • announceRouteFound: Announced when a route is found: how far, how long, and how it is travelled.
  • announceRoutingCancelled: Announced when the person cancels a route or area request.
  • announceRoutingError: Announced when a route or area request fails, saying what to do next.
  • announceSearchError: Says what went wrong with a search and what to do next.
  • announceSearchPicked: Announced when a search finds exactly one place and the map goes to it without a list to choose from.
  • announceSearchResults: "3 results" or "1 result".
  • announceSelectionCleared: The selection was emptied.
  • announceSelectionFull: An addition was refused whole because the selection would pass its limit.
  • announceShowingFeature: "Show on map" centred the map on a feature.
  • announceStopAdded: Announced when a stop is added to the directions.
  • announceStopLimit: Announced when a stop cannot be added because the directions hold max already.
  • announceStopMoved: Announced when a stop moves to a new place in the list.
  • announceStopRemoved: Announced when a stop is removed from the directions.
  • announceSuggestions: "3 suggestions" or "1 suggestion", announced as the person types.
  • announceSuggestionsUnavailable: Announced once when suggestions stop working, so the person knows Enter still searches.
  • announceSurfaceClosed: Announced when a panel, dialog or sheet closes.
  • announceSurfaceOpened: Announced when a panel, dialog or sheet opens.
  • announceTileError: Announced when map tiles fail to load.
  • announceTilesRecovered: A tile layer that was slow or had found no tiles loaded one, so its status has gone.
  • announceTilesSlow: A tile layer is still waiting for its first tile, in the words of describeTilesSlow.
  • announceTilesUnavailable: A tile layer's tiles all failed, in the words of describeTilesUnavailable.
  • announceTimeMoved: Announced when a chosen time is not offered and the layer moves to the nearest slot that is.
  • announceTourSkipped: Announced when the person skips the first-visit tour, saying how to start it again.
  • announceZoom: Announced when the zoom level settles.
  • appendMessages: lead followed by each of rest that is not null, nested in joiner (such as common.followedBy, which puts a space between them).
  • assertValidDefinitions: Validates a set of definitions, including that their ids are unique, and returns it unchanged.
  • blurSearch: The search input lost focus.
  • boundingBox: The smallest box holding every position of a geometry, as [west, south, east, north].
  • boundingBoxToBounds: Converts a BoundingBox to the Bounds the map port uses.
  • boundsAroundPoint: The latitude and longitude box around a circle: radiusMetres north, south, east and west of centre.
  • boundsOfPaths: The smallest latitude and longitude box holding every vertex of every path and every edge between neighbouring vertices of one path, each edge taken the short…
  • boundsOfPoints: The smallest latitude and longitude box holding every point, with its latitudes clamped to valid coordinates.
  • buffer: Grows a geometry by distance metres on every side, giving the area within that distance of it: a ring around a point, a rounded strip along a line, a larger…
  • buildAttribution: The credits to show for a basemap: the provider's entries followed by MapLibre's own credit.
  • buildThemeBootstrapScript: Builds the inline script that sets the theme before first paint, so a dark theme never flashes light.
  • canAddStop: Whether another stop fits.
  • cardOf: The card a layer's features open: a feed's own, or an identifiable layer's nested one.
  • centralAngle: The angle at the centre of the Earth between two positions, in radians.
  • centroid: The mean of a geometry's vertices, as a map position.
  • checkDefinitionTexts: Checks a host's own definition text against its translations, for a host's own tests: lists the HostText keys the definitions use and reports each that…
  • checkMessageCatalogue: Checks a host's message catalogue against the English one, for a host's own tests or a command line: every key is present and known, every form keeps all the…
  • chooseLayout: Chooses the presentation for a viewport: a side panel from 768px wide or on any screen shorter than 500px, otherwise a bottom sheet.
  • circleArea: The area of a circle of radiusMetres on the sphere (a spherical cap), in square metres.
  • circleCircumference: The length of the edge of a circle of radiusMetres on the sphere, in metres.
  • circleRing: The points of a circle of radiusMetres around centre, as an open ring of steps positions that starts due east and runs anticlockwise.
  • clampHeight: Keeps a dragged height inside the peek and full extremes, with rubber-band resistance beyond them.
  • clampZoom: Limits zoom to the range [min, max].
  • clearPin: Removes the pin, and closes its card if that is the active surface.
  • clearsInlineEnd: Whether box starts at least gap pixels past where anchor ends along the reading direction: to the right of it when reading left to right, to the left when…
  • closeSurface: Closes whichever surface is open.
  • computeBottomSlotLayout: Where the bottom slots sit relative to their resting place, which is inset above the bottom edge and inset in from the side.
  • computeDetentHeights: The visible height of each detent for a viewport, in whole pixels.
  • computeEndStackMaxHeight: The tallest the end stack may be before it scrolls.
  • computeScaleBar: Chooses a round-number scale bar that fits in maxWidthPx.
  • coordinateSearchResult: Turns search text into the one result for the place it names, when the text is a coordinate pair (see parseCoordinates), and null otherwise.
  • coordinateWordsFor: The coordinate words of catalogue's language, from its format.word* keys, for parseCoordinates to read in addition to its English ones.
  • createBasemapCatalogue: Builds a BasemapCatalogue.
  • createDecoderRegistry: A registry with the built-in geojson decoder plus any extra ones, by name.
  • createDrawReducer: Builds a drawing reducer that names the shapes it creates with labels (the shipped English when none is given): pass a catalogue so a new shape is called…
  • createFakeMapAdapterFactory: Builds a MapAdapterFactory of fakes.
  • createFakeServices: Builds a complete Services from the fakes.
  • createFormatterRegistry: A registry of the built-in formatters plus any extra ones, by name.
  • createLanguageCatalogue: Builds a LanguageCatalogue.
  • createNamedRegistry: Builds a NamedRegistry over a fixed set of entries.
  • createRuntimeLayerCatalogue: A LayerCatalogue whose definitions come from the host's own load function, so they can differ for each person and change without a deploy.
  • creditsLine: The credits of a basemap and the layers drawn over it as one line of text, for a saved image that keeps its sources.
  • cycleDetent: The next detent for Enter or Space on the handle: peek, half, full, then back to peek.
  • dateTimeRange: The first and newest slots a control offers at now.
  • decodeDetail: Decodes a detail response (such as an event's affected area) and keeps its lines and polygons.
  • decodeFeed: Decodes a feed response with the definition's decoder, applies its filter and keeps the geometry the layer draws: points for a point style or a heatmap,…
  • decodeFeeds: Decodes the responses to the requests feedUrls lists, as decodeFeed does for one, and joins them in the order they came.
  • decodeIdentify: Decodes a service's answer to a tap into features, keeping at most MAX_IDENTIFIED_FEATURES.
  • decodeShapes: Reads shapes written by encodeShapes.
  • decodeWith: Decodes a raw response with the decoder registered as name, the way the feed, detail and identify functions do, so a host that reads a response of its own…
  • defaultBasemapFor: The basemap a catalogue shows in a theme when nobody has chosen one: the host's default for that theme, else the catalogue's default.
  • defaultControlValues: Every control's default value, as strings, by control id.
  • defaultSlot: The control's default slot at now, kept inside its bounds, since a relative default can pass a fixed bound as time goes on.
  • densifyAlongGreatCircles: Cuts every segment of a path into pieces along its great circle (see greatCirclePoints).
  • describeArea: Describes an area in words for a screen reader, for example "1.25 hectares" or "1 square mile", as a message to format with the active catalogue.
  • describeAxisSuggestion: What to say when a WKT file imported nothing because its first position fits only the other axis order.
  • describeChosenTime: The date or time a layer is set to, in words for a status line or an announcement: the first date control's day ("11 November 2026") or the first date and…
  • describeDay: Words for a UTC day, such as "11 November 2026".
  • describeDistance: Describes a distance in words for a screen reader, for example "1.25 kilometres" or "1 mile", as a message to format with the active catalogue.
  • describeDistanceReading: A distance in a given unit as words, "1.25 kilometres": the unit's plural key with the count.
  • describeDuration: Describes a travel time in words for a screen reader, for example "18 minutes", "1 hour 5 minutes" or "2 days", as a message to format with the active…
  • describeLayersLoadFailed: The catalogue could not be loaded at all.
  • describeLayersLoading: The catalogue's layers are still being fetched.
  • describeLayersRefreshFailed: A refresh failed, so the list from before stays.
  • describeLayersSkipped: How many of the host's definitions were left out, as a phrase with no full stop.
  • describeNoLayers: The catalogue loaded and holds no layers.
  • describeShapeImport: The message for what a file held, shown beside the Import button and announced: how many shapes were imported, how many were skipped and why, and whether…
  • describeShapeMeasure: A shape's measures in words for a screen reader, for example "area 1.2 hectares, perimeter 480 metres".
  • describeSlot: Words for the slot shown, with its time zone, such as "14:30 to 15:00 UTC on 11 November 2026".
  • describeSlotStart: Words for when a slot starts, with its time zone, such as "14:30 UTC on 11 November 2026".
  • describeStop: A stop for a screen reader: "Stop A, Paris", or its coordinates when it has no name, as a message to format.
  • describeTilesSlow: The status line of a tile layer that has had tiles asked for and none has loaded yet.
  • describeTilesUnavailable: The status line of a tile layer whose tiles all failed.
  • describeZoomIn: The status line of a layer that is too far out to load, naming the normalised zoom level to zoom in to.
  • describeZoomOut: The status line of a layer that is too far in to show, naming the level to zoom out to.
  • destinationPoint: The position reached by travelling metres from from along a great circle on bearing (degrees clockwise from north).
  • detailUrl: The URL of a feature's detail, or null when the layer has none or the feature's URL is not https on one of the origins the definition declares.
  • difference: The part of first that second does not cover, or null when nothing is left.
  • distanceMetres: The great-circle distance between two positions, in metres (haversine).
  • draftOf: The shape that is still being drawn, or null.
  • dragHandle: The gesture after the pointer moves to at: a drag from then on if it left the tolerance.
  • drawKeyCommand: Maps a key press on the map region (or in the draw toolbar) to a command.
  • drawReducer: Applies an action to the drawing.
  • dropPin: Records a dropped pin.
  • editHandlesFor: The handles the person can drag on the selected shape: a vertex at each position, a midpoint on each edge of a finished line or polygon (pressing one adds a…
  • encodeShapes: Writes finished, valid shapes as a short text for a link: one letter for the kind (p point, l line, g polygon, c circle) and then the positions as whole units…
  • escapeAction: What Escape does next, one level at a time: leave a selected vertex, then cancel a shape being drawn, then drop the selection.
  • evaluatePointStyle: Works out a feature's colour, size, shape and label from a point style.
  • evaluateShapeStyle: Works out one polygon's or line's look from a style and the feature's fields.
  • exportableShapes: The shapes that can be exported: finished, and valid.
  • featureRefKey: A key that is equal for two references exactly when both ids are equal, for a set or a map of references.
  • feedUrl: The URL for a feed or query layer's controls.
  • feedUrls: The URLs to ask for a feed or query layer's controls: one, except for a query layer whose area crosses the antimeridian, which gets one for each side of the…
  • feetToMetres: Converts international feet to metres.
  • fillUrlTemplate: Fills a URL template from string values, encoding each one.
  • formatArea: Formats an area with a short unit, for example "850 m²", "1.25 ha", "2.5 km²", "1,076 ft²", "1 ac" or "1.93 mi²", as catalogue writes it (see formatDistance).
  • formatDay: Words for the UTC day of date in locale (formatLocale(catalogue)), for example "11 November 2026".
  • formatDistance: Formats a distance with a short unit, for example "850 m", "1.25 km", "328 ft" or "1.25 mi", as catalogue writes it: its figure format, its units.symbol.*…
  • formatDuration: Formats a travel time with short units, for example "18 min", "1 h 5 min" or "2 d 3 h", as a message to format with the active catalogue.
  • formatFixed: Formats a number with a fixed count of decimals, always with a dot separator, and never as a negative zero.
  • formatLatitude: Formats a latitude with a hemisphere letter, for example "26.20410° S".
  • formatLatLng: Formats a position as "lat, lng" with five decimals and a dot separator regardless of locale, for example "-26.20410, 28.04730".
  • formatLocale: The locale tag to give Intl for numbers and dates: the catalogue's language, with its numberingSystem as a -u-nu- extension when it has one; a malformed…
  • formatLongitude: Formats a longitude with a hemisphere letter, for example "28.04730° E".
  • formatMessage: Turns a Message into text with catalogue.
  • formatNumber: Formats a number for display with the grouping, decimals and digits of locale.
  • formatShapeMeasure: A shape's measures as short text for the readout, for example "1.2 ha · 480 m", "850 m", or "500 m radius · 78.5 ha" for a circle.
  • formatTemplate: Fills a card or list template from a feature's fields, through the named formatters.
  • formatWkt: Writes a GeoJSON geometry, or the geometry of a feature, as Well-Known Text in the form parseWkt reads back: upper-case type names, one space between a…
  • formatZoom: Formats a zoom level with at most one decimal, for example "12" or "12.5".
  • geometryArea: The area of a geometry in square metres, on the ground.
  • geometryLength: The length of a geometry in metres, along the ground.
  • getBasemap: Finds a built-in basemap by id.
  • globeRadiusPixels: The radius of the globe on the screen, in pixels, at a normalised zoom and view centre latitude.
  • greatCircleInterpolate: The position a fraction t (0 to 1) of the way along the great circle from from to to.
  • greatCircleMidpoint: The point halfway along the great circle between two positions.
  • greatCirclePoints: The positions along the great circle from from to to, both included, no more than maxStepRadians apart (and at most MAX_GREAT_CIRCLE_STEPS pieces).
  • greatCircleStepRadians: The longest arc, in radians, that a straight line on the screen can stand for on a globe of radiusPixels while straying at most tolerancePixels from it.
  • handleReach: How far from a handle a press still lands on it.
  • hasCard: Whether a layer's features open a card: a feed layer, or a tile layer that answers a tap.
  • hasZoomWindow: Whether a layer's definition has a zoom window, so the map's zoom is worth reporting to it.
  • heatmapOpacity: A layer's opacity from its opacity control, or DEFAULT_HEATMAP_OPACITY.
  • heatmapSettings: A heatmap's radius in pixels and intensity, from fixed numbers or the layer's controls.
  • hemispheresFor: The hemisphere letters of catalogue's language, from its format.hemisphere* keys, so no code here branches on a language.
  • hintFor: The instruction shown under the toolbar for a drawing mode.
  • hitTestHandle: The handle a press at at lands on: the nearest within tolerancePx.
  • identifyRequestUrl: The URL a layer source asks for a tap: identifyUrl, refused as a typed error when it cannot be built or is not https.
  • identifyUrl: The URL that asks a tile layer's service what is at a tap, as a WMS GetFeatureInfo request does.
  • imageMarksFor: The marks that draw shapes into an exported map image: a point is a dot, a line an open path, a polygon or circle a closed, filled path, and a shape still…
  • inlineDistanceToFarEdge: How far a box's far edge is from the inline-start side of its container: from the left when reading left to right, from the right when reading right to left.
  • intersect: The area two polygons share, or null when they share none.
  • isCategoricalSlot: Whether a value names a categorical colour.
  • isCompactViewport: Whether a viewport is a phone's, in either orientation: narrower than PANEL_MIN_WIDTH (the bottom sheet) or shorter than PANEL_MAX_HEIGHT_EXCLUSIVE (a phone…
  • isControlEnabled: Whether a control can be used with the other controls' current values.
  • isEmptyGeometry: Whether a validated geometry holds no positions: empty coordinates, or a collection whose members are all empty.
  • isFeedLayer: Whether a definition is a layer of features with cards and a list: points, polygons or lines from a feed or a query.
  • isHeatmapLayer: Whether a definition is a heatmap of a feed or a query.
  • isIdentifiable: Whether a definition is a raster tile layer that answers a tap, with an identify block.
  • isIsoDate: Whether a string is a real YYYY-MM-DD calendar day.
  • isMessageKey: Whether text is a key of the shipped catalogue.
  • isolate: Wraps text in a first-strong isolate, so a name, a coordinate or a number with a unit keeps its own order inside a right-to-left sentence and cannot pull the…
  • isOrdinalSlot: Whether a value names a step of the ordered ramp.
  • isPaletteSlot: Whether a value names any palette colour.
  • isQueryLayer: Whether a definition requests only the features in view.
  • isRasterTileLayer: Whether a definition is a raster tile layer: an overlay that loads no features and has no list, and has a card only through an identify block.
  • isSettingsSection: Whether a section belongs to the Settings sheet (Settings and Help) rather than the Map options sheet.
  • isShapeStyle: Whether a feed layer's style draws polygons and lines rather than points.
  • isSlotValue: Whether a value is a real UTC day and time written YYYY-MM-DDtHHMM.
  • isVectorTileLayer: Whether a definition is a vector tile layer.
  • joinMessages: Joins messages into one, in order, by nesting them in joiner.
  • kilometresToMetres: Converts kilometres to metres.
  • languageDirection: Resolves a language's reading direction, preferring the host's override.
  • layerZoomLimit: Which way to zoom for a layer to show at a normalised zoom, or null when the zoom is inside its window or it has none.
  • legendFor: A layer's legend.
  • loadsFeatures: Whether a definition loads features from a feed or a query (points, shapes or a heatmap).
  • mapKeyAction: Maps a key press on the map region to an action.
  • mapMetresPerPixel: Ground resolution, in metres per pixel, at latitude on a map of the given shape whose view is centred at centreLatitude and normalised zoom.
  • matchesFilter: Whether a decoded feature passes a definition's filter.
  • maxAgeFromCacheControl: Reads the max-age of a Cache-Control header in seconds.
  • measureLineDistance: Measures the total length (kilometres) of a line drawn through positions, in order.
  • measurePolygonArea: Measures the area (square metres) enclosed by positions.
  • measureShape: The measures of a shape along the geodesic (WGS 84, never flat pixels), using the same maths as the Measure tool.
  • mercatorProject: Projects a position to Web Mercator world pixels at a normalised zoom, with the origin at the top-left of the world.
  • mercatorUnproject: The inverse of mercatorProject.
  • message: Builds a Message: a key and the parameters its placeholders need.
  • metresPerPixel: Ground resolution at a latitude and normalised zoom, in metres per pixel.
  • metresToFeet: Converts metres to international feet.
  • metresToKilometres: Converts metres to kilometres.
  • metresToMiles: Converts metres to international miles.
  • milesToMetres: Converts international miles to metres.
  • moveStop: The stops with one moved a place earlier (-1) or later (1).
  • nearestLongitude: The copy of lng (it plus or minus whole turns) nearest reference.
  • nextDetent: The detent one step up or down from current, clamped at the ends.
  • nextQueryWindow: The window a query layer should have for view: the last one while the view is still inside it and not much smaller than it, otherwise a new one.
  • openSearch: Opens the search results surface.
  • openSheet: Opens the sheet at the half detent.
  • parseCoordinates: Reads a pair of coordinates from text a person typed, or returns null when the text is not one.
  • parseHandleId: Reads an id made by editHandlesFor, or returns null for anything else.
  • parseShapeFile: Reads the shapes in a GeoJSON file, in Well-Known Text (WKT) or in a CSV, ready for the draw reducer's import action.
  • parseTemplate: Lists a template's placeholders, in order.
  • parseThemeChoice: Reads a stored value as a theme choice.
  • parseTime: Reads a time as epoch milliseconds: a number is taken as milliseconds, and an ISO string is parsed, reading one with a time but no zone as UTC (GDACS writes…
  • parseUrlHash: Reads the shareable state from a location hash such as #map=12.35/-26.20410/28.04730/90&basemap=osm-liberty.
  • parseWkt: Reads a Well-Known Text string into a GeoJSON geometry.
  • partitionDefinitions: Sorts a list of values a host supplied into valid layer definitions and the values that were not, so one bad definition costs one layer and not the list.
  • pickShape: The id of the topmost shape a tap at at lands on, or null.
  • placePath: Places a path on the screen.
  • placePoint: Where one position is drawn, or null when it is beyond the horizon of a globe.
  • planRequestedImage: Works out what a request for an image asks for, so every adapter refuses the same requests: the map on screen as it is gives undefined, and anything with a…
  • pngHeader: The start of a PNG of a given size: its signature and the width and height of its IHDR chunk.
  • pointInPolygon: Whether a point lies inside a polygon or multipolygon.
  • polygonSelfIntersects: Whether the closed ring through vertices crosses, touches or doubles back over itself.
  • pressEscape: The Escape key.
  • pressHandle: Starts a gesture when a press at at lands on a handle, or returns null for a press on the bare map.
  • queryBoxes: The boxes to ask a provider for window, each inside -180 to 180: the window itself, or when it crosses the antimeridian (east past 180) the part from west to…
  • queryWindow: The box a query layer asks for when the map shows view: the view with a margin, snapped outward to a grid in proportion to its size.
  • reachableAreaSize: The ground area of the reachable areas together, in square metres.
  • readArea: Picks the unit and rounds an area for display.
  • readDistance: Picks the unit and rounds a distance for display.
  • readPath: Reads a value by dotted path, such as properties.url.geometry or geometry.coordinates.2.
  • readPngSize: Reads the pixel size from the start of a PNG blob: the fake's header or a real file.
  • readWktRecovering: Reads WKT text that holds one geometry or more, as readWktSequence does, but goes on after a geometry it cannot use instead of giving up.
  • readWktSequence: Reads WKT text that holds one geometry or more, one after another in any layout (one to a line is the usual one), into GeoJSON geometries in the same way as…
  • readyLayers: The layers a state offers: its list when ready, and none while the catalogue is loading or has failed.
  • refuseBoxOnGlobe: Refuses a box view on a globe, which no adapter can frame reliably yet: the camera that fits a box is a flat one, and once the projection is a sphere the box…
  • removeStop: The stops without the one named by id.
  • resolveBasemapFor: Turns a stored or linked id into a basemap for a theme.
  • resolveControlValues: A full set of control values from partial, untrusted ones (a permalink, a change in the ui): values a control accepts are kept, a date outside its bounds is…
  • resolveDateBound: Turns a date bound into YYYY-MM-DD, counting relative days back from now in UTC.
  • resolveLanguage: Picks the language to show.
  • resolveLayerTemplate: Resolves host-keyed layer text.
  • resolveSlot: A slot the control offers for an untrusted value: rounded down to the step and moved inside the bounds, or undefined when it is not a slot at all.
  • resolveSnap: Picks the detent to settle on when a drag ends.
  • resolveText: The words a person reads for a definition's text.
  • resolveTheme: Turns the user's choice into the theme to show.
  • ringSignedArea: The signed area of a ring in square degrees (shoelace, longitude as x): positive when the ring runs anticlockwise on a map.
  • roundForLookup: Rounds a position to LOOKUP_DECIMAL_PLACES decimal places, so a third-party service is sent roughly 11 m of precision, not the exact point the user chose.
  • routeBounds: The smallest box that holds every line or ring of the features, or null when they hold no position.
  • routingErrorMessage: The message that tells a person a route or area request failed, saying what happened and what to do next.
  • rubberBand: Resistance for dragging past an extreme.
  • sampleArea: A square polygon feature around centre, half a degree across by default, for SAMPLE_AREA_LAYER.
  • sampleLine: A two-point line feature, for SAMPLE_LINE_LAYER.
  • samplePoint: A decoded point feature for SAMPLE_FEED_LAYER.
  • selectedShape: The selected shape, or null.
  • serialiseUrlHash: Writes the shareable state as a location hash, for example #map=12.35/-26.20410/28.04730&basemap=osm-liberty.
  • setDetent: Moves the sheet to a detent.
  • shapeAppearances: How every class of a style is drawn, in legend order, with defaults filled in.
  • shapeClasses: Every class of a style in legend order: the categories and then the class for other values, the steps, the equal intervals worked out from the range, or the…
  • shapeEvaluator: Prepares a style once, so drawing thousands of features does not work out its classes for each one.
  • shapeGeometry: The GeoJSON geometry of a shape, or null when it is not valid.
  • shapeInputBounds: The box that holds every shape in inputs: each vertex, and the whole of a circle's outline, taking the short way across the antimeridian (so east may pass 180).
  • shapeLabel: A name for a shape of kind, such as "Polygon 2", in the words of catalogue (the shipped English when none is given).
  • shapeRing: The outline of an area shape as an open ring: a polygon's vertices, or the points around a circle.
  • shapesToCsv: The shapes as CSV text: id, type, area_m2, length_m, the GeoJSON geometry as quoted text, and for a circle its radius_m, centre_lng and centre_lat, so a…
  • shapesToGeoJson: The shapes as a GeoJSON FeatureCollection, one feature each, with the shape's id, its name, its type and its area and length where they apply.
  • shapesToGeoJsonText: The text of the GeoJSON file for the shapes: shapesToGeoJson as JSON indented by two spaces, with every number written as plain decimal text and none with an…
  • shapesToWkt: The shapes as Well-Known Text, one geometry to a line and longitude first, in the order of the list, with the positions shapeGeometry gives (six decimals, or…
  • shortestLongitudeSpan: The narrowest run of longitude, going east from west to east, that holds every one of lngs: the circle of longitude less its widest empty gap.
  • shouldOfferTour: Whether to offer the tour on this page load: the person has not answered this version, storage will remember the answer, and the address carries no shared…
  • shouldShowZoomButtons: Decides whether to show the zoom buttons.
  • simplify: Removes vertices that lie within tolerance metres of the line that would replace them (the Douglas-Peucker method), keeping every end point and every ring…
  • slotInstant: The ISO instant a provider names a slot by, such as 2026-11-11T14:30:00Z.
  • slotsOnDay: The slots the control offers on one UTC day (YYYY-MM-DD), earliest first: the whole day, cut at the first and newest slots, and none outside them.
  • slotTime: A slot's start in milliseconds since the epoch, or null when it is not a real UTC day and time.
  • slotValue: Writes a time as a slot, YYYY-MM-DDtHHMM in UTC, dropping seconds.
  • squareMetresToAcres: Converts square metres to acres.
  • squareMetresToHectares: Converts square metres to hectares.
  • squareMetresToSquareFeet: Converts square metres to square feet.
  • squareMetresToSquareKilometres: Converts square metres to square kilometres.
  • squareMetresToSquareMiles: Converts square metres to square miles.
  • startDirections: Opens the directions panel.
  • startDraw: Starts drawing shapes.
  • startMeasure: Starts measuring.
  • startsLikeWkt: Whether the text starts with the name of a WKT geometry type (in any case, with or without a Z, M or ZM tag), including the curved types parseWkt does not…
  • stepDone: Whether the person has done what a step asks, comparing the app state when the step began with the state now.
  • stopDirections: Closes the directions panel.
  • stopDraw: Stops drawing.
  • stopLetter: The letter a stop is known by on the map and in the list: "A" for the first stop, "B" for the next.
  • stopMeasure: Stops measuring.
  • suggestWktAxisOrder: The other order of the two, when the first position in WKT text lies outside the world in the order given but inside it in the other, which is the sign of a…
  • surfaceReducer: Applies an action to the surface state.
  • templateValues: The values a URL template can use, from values already resolved with resolveControlValues: every control value (a date and time as its ISO instant, the form a…
  • textOrMessage: A definition's text as a placeholder value for a Message: a key becomes a message with no parameters, which the one place that speaks the sentence formats in…
  • tileUrl: The tile URL template for a raster or vector tile layer's controls, with the engine's own placeholders ({z}, {bbox-epsg-3857}) left in.
  • toEngineZoom: Converts a normalised zoom to MapLibre's zoom number.
  • toNormalisedZoom: Converts MapLibre's zoom number to the normalised zoom.
  • tourReducer: Applies an action to the tour.
  • travelModeLabel: The short name of a travel mode, as it labels a choice: "Drive", "Walk" or "Cycle", as a message to format.
  • travelModeParticiple: A travel mode as it reads in a sentence: "driving", "walking" or "cycling", as a message to format.
  • union: Merges polygons into one area.
  • unsharableShapes: The finished, valid shapes that encodeShapes leaves out because a link cannot carry them: a circle of under a metre, and a line or polygon too small to keep…
  • unwrapLongitudes: The positions of a path with each longitude moved to the copy nearest the one before it, and the first to the copy nearest referenceLng, so every step goes…
  • validateGeometry: Checks that input is a well-formed GeoJSON geometry, or a feature holding one, and returns the geometry itself (the same object, not a copy).
  • validateLayerDefinition: Checks an untrusted value against the layer definition schema and returns every problem as a path: message line, or an empty list.
  • validateShape: Whether a shape could be finished as it stands, and if not, why.
  • verticesCollinear: Whether every position lies on one straight line (or there are fewer than three), so no area can be enclosed.
  • visibleRuns: The parts of a placed path to draw as lines, each with at least two points: the runs of consecutive visible points, so a line that goes over the horizon of a…
  • webMercatorToWgs84: Converts a Web Mercator point (EPSG:3857) to a WGS 84 position (EPSG:4326).
  • wgs84ToWebMercator: Projects a WGS 84 position (EPSG:4326) to Web Mercator (EPSG:3857).
  • wrapLongitude: Brings a longitude into [-180, 180), the range stored, exported and shared.

Classes​

  • FeatureQueryError: The only error a feature query rejects with.
  • FileOpenError: The only error a file opener rejects with.
  • GeometryError: The only error the geometry helpers throw.
  • LayerError: The only error a layer source rejects with.
  • LocationError: The only error a location provider throws, apart from PortAbortError.
  • MapEngineError: The only error a map adapter rejects with when its engine cannot start, and the payload of its fatalError event when the engine stops later.
  • MapImageExportError: What toImage rejects with when a requested size or view cannot be honoured.
  • PortAbortError: Thrown by an async port when the caller's AbortSignal fires before the work finishes.
  • RoutingError: The only error a routing provider rejects with.
  • SearchError: The only error a search provider throws, apart from PortAbortError.
  • SharedResponseCache: Keeps responses by key (normally the URL) for their max-age, and shares a request already in flight, so several layers over one feed (alerts split by type)…
  • UnsupportedSridError: The error for text in a spatial reference system other than SUPPORTED_WKT_SRID.

Constants​

  • AREA_MINUTES: The travel times, in minutes, a person can ask a reachable area for.
  • BASEMAPS: Every built-in basemap, in the order the picker shows them, the default first.
  • BUILT_IN_BASEMAP_CATALOGUE: The catalogue of the built-in basemaps: Bright the default in the light theme and Fiord in the dark theme.
  • BUILT_IN_FORMATTERS: The formatters every registry has: relative ("3 hours ago"), number (grouped, at most one decimal), km ("10 km") and date ("8 Nov 2026, 14:05 UTC").
  • CATEGORICAL_SLOTS: The names of the data palette's colours.
  • DEFAULT_AREA_WIDTH: Stroke width in pixels of a polygon's outline when the style names none.
  • DEFAULT_BASEMAP_BACKGROUND: The default basemap's background (land) colour: the background layer of the OpenFreeMap Bright style, written as that style writes it (Liberty's is the same).
  • DEFAULT_BASEMAP_ID: The basemap shown in the light theme when nobody has chosen one, and the one a catalogue that names no per-theme default falls back to.
  • DEFAULT_DARK_BASEMAP_BACKGROUND: The dark default basemap's background (land) colour: the background layer of the OpenFreeMap Fiord style (checked 2026-11-11).
  • DEFAULT_DARK_BASEMAP_ID: The basemap shown in the dark theme when nobody has chosen one.
  • DEFAULT_FAKE_FIX: The fix a FakeLocationProvider returns until scripted otherwise.
  • DEFAULT_FAKE_SETTINGS: What a fresh MemorySettingsStore holds.
  • DEFAULT_FAKE_VIEW: The view a FakeMapAdapter starts with before it is mounted.
  • DEFAULT_FILL_OPACITY: Opacity of a polygon's fill when the style names none.
  • DEFAULT_HEATMAP_OPACITY: How opaque a heatmap is when its layer has no opacity control.
  • DEFAULT_IDENTIFY_TOLERANCE_PX: How far from a tap, in CSS pixels, a layer looks when its definition says nothing: a box a little under a fingertip.
  • DEFAULT_IMAGE_PIXEL_RATIO: The pixel ratio of a requested image that names none, so its size does not depend on the device.
  • DEFAULT_LINE_WIDTH: Stroke width in pixels of a line when the style names none.
  • DEFAULT_MARKER_RADIUS: The radius in pixels of a marker whose style has no size rule.
  • DEFAULT_SELECTION_LIMIT: The most references a selection holds unless its host sets another limit.
  • DRAW_ISSUE_MESSAGES: What to do about each reason a shape or an edit was refused.
  • DRAW_KEY_HELP: The keyboard shortcuts of the draw tool, in display order, as message keys.
  • EARTH_RADIUS_METRES: Mean radius of the Earth in metres, the sphere every draw measure uses.
  • emptyLayerCatalogue: The LayerCatalogue for a host that supplies no data layers, so the sheet's Layers section stays hidden.
  • EN_GB_CATALOGUE: The SDK's shipped default catalogue: British English, the source language.
  • ENGINE_PLACEHOLDERS: Placeholders the map engine fills itself in a tile URL.
  • EQUATOR_METRES_PER_PIXEL_AT_ZOOM_0: Ground resolution at the equator at normalised zoom 0, in metres per pixel.
  • FAKE_HYBRID_BASEMAP: A hybrid basemap (image tiles under the labels of a vector style), with real detail to tile level 14 and zoom limits 0 to 17.
  • FAKE_RASTER_BASEMAP: A raster basemap, with zoom limits 2 to 12.
  • FAKE_VECTOR_BASEMAP: A vector basemap, with zoom limits 0 to 18.
  • geojsonDecoder: The built-in decoder for GeoJSON feature collections, and for documents that are GeoJSON-like (a features list of objects with a geometry).
  • GLOBE_CHORD_TOLERANCE_PX: The furthest, in pixels, a straight piece of a line drawn over a globe may stray from the great circle it stands for.
  • IDENTIFY_VARIABLES: The variables an identify URL is filled with, besides the layer's controls.
  • initialDrawState: Nothing drawn, polygon mode, nothing selected.
  • initialSurfaceState: Nothing is open, no pin is dropped and focus belongs to the map.
  • initialTourState: No tour on screen.
  • LANGUAGE_STORAGE_KEY: The localStorage key holding the language choice, as JSON (a BCP 47 tag such as "af", or null).
  • MAP_KEY_HELP: The keyboard shortcuts of the map region, in display order, as message keys.
  • MAP_SHAPE_ATTRIBUTE: The attribute the pre-paint script puts on the root element, with the value globe, when the stored map shape is a globe, so the placeholder painted before the…
  • MAPLIBRE_CREDIT: The credit for MapLibre GL JS, which draws every basemap.
  • MAX_AXIS_SCAN_CHARACTERS: How much of the start of a text suggestWktAxisOrder looks at: 4,096 characters, enough for the first geometry's opening and a few lines of leading text, and a…
  • MAX_CIRCLE_RADIUS_METRES: The largest radius a circle may have, in metres (10,000 km).
  • MAX_DIRECTION_STOPS: The most stops a route may have.
  • MAX_DRAWING_SHAPES: The most shapes the drawing may hold.
  • MAX_GREAT_CIRCLE_STEPS: The most pieces one segment is cut into.
  • MAX_IDENTIFIED_FEATURES: The most features one layer yields for one tap, however many its answer holds.
  • MAX_IDENTIFY_TOLERANCE_PX: The largest tolerance a definition may set, in CSS pixels.
  • MAX_IMAGE_PIXELS: The most pixels in one image, 4096 by 4096.
  • MAX_IMAGE_SIDE_PX: The most image pixels on one side.
  • MAX_IMPORT_BYTES: The largest file the draw tool imports: 1 MB.
  • MAX_IMPORT_POINTS: The most points one file may hold in all.
  • MAX_IMPORT_SHAPE_POINTS: The most points one imported shape may have.
  • MAX_IMPORT_SHAPES: The most shapes one file may hold, counting those that are skipped.
  • MAX_MERCATOR_LATITUDE: The furthest latitude Web Mercator can show.
  • MAX_MINUTES_AGO: The furthest back a relative bound may reach, about a hundred years in minutes, so a slot is always a date Date can write.
  • MAX_SHARE_LENGTH: The most characters a shared set of shapes may take in a link.
  • MAX_SHARE_SHAPES: The most shapes a link may carry.
  • MIN_IDENTIFY_TOLERANCE_PX: The smallest tolerance a definition may set, in CSS pixels.
  • NORMALISED_TILE_SIZE: Size in pixels of the tiles the normalised zoom number refers to.
  • ORDINAL_SLOTS: The ordered ramp, lowest first.
  • PALETTE_SLOTS: Every colour a definition may name.
  • PANEL_MAX_HEIGHT_EXCLUSIVE: Height below which the surface is a side panel whatever the width.
  • PANEL_MIN_WIDTH: Width from which the surface is a side panel rather than a bottom sheet.
  • PROJECTION_STORAGE_KEY: The localStorage key holding the map shape setting, as JSON ("globe").
  • QUERY_BOX: The four edges of the box a query layer's URL asks for.
  • QUERY_PLACEHOLDERS: Placeholders only a query layer's URL may use: the box and limit.
  • SAMPLE_ALERT_LAYER: A feed layer coloured by category, with a distinct shape for each, an on-demand detail source and a disclaimer.
  • SAMPLE_AREA_LAYER: A feed of polygons shaded in equal intervals over a numeric field, with a pattern per class and a text label.
  • SAMPLE_FEED_LAYER: A feed layer that exercises every feed feature except detail: a segmented and a conditional switch control, a derived URL variable, colour steps with sizes, a…
  • SAMPLE_HEATMAP_LAYER: A heatmap of a feed, with radius and intensity controls beside the opacity.
  • SAMPLE_IDENTIFY_LAYER: A raster overlay that answers a tap: its identify block asks a service for what lies in a small box around the tap, as a WMS GetFeatureInfo request does, and…
  • SAMPLE_LAYERS: Every sample definition, in a stable order.
  • SAMPLE_LINE_LAYER: A feed of lines coloured by category, each with its own width and dash.
  • SAMPLE_QUERY_LAYER: A query layer: it asks only for the features inside the view, and draws at most three of them (a small cap, so tests reach it with a few features).
  • SAMPLE_TILE_LAYER: A raster overlay with a bounded date and an opacity control.
  • SAMPLE_TIME_LAYER: A raster overlay named by half hour, with a date and time control whose newest slot is six hours back, and an opacity control.
  • SAMPLE_VECTOR_LAYER: A vector tile layer with three source layers: shaded areas with labels, roads by rank over a narrower zoom window, and a heatmap of events.
  • SHAPE_FILE_TYPES: The file types the import offers in the picker: GeoJSON, CSV and WKT, by extension and by media type.
  • SHAPES_CSV_HEADER: The header row of the CSV the draw tool writes, and reads back.
  • SHARE_PATTERN: What a shared set of shapes looks like: link-safe characters only, within the size limit.
  • SUPPORTED_WKT_SRID: The only SRID the reader accepts: WGS 84, which WKT without a prefix is in.
  • THEME_ATTRIBUTE: The attribute on the root element that carries the resolved theme.
  • THEME_COLOR_META_NAME: The name of the meta tag that tints the browser chrome.
  • THEME_COLOR_META: The theme-color meta content for each resolved theme.
  • THEME_STORAGE_KEY: The localStorage key holding the theme choice as a plain string.
  • TRAVEL_MODES: Every way of travelling, in the order the interface lists them.
  • WEB_MERCATOR_HALF_WORLD: Half the width of the world square, in metres: the easting at 180 degrees.

Types​

  • AreaGeometry: The outline of an area, as GeoJSON writes a Polygon (a ring, then any holes) or a MultiPolygon.
  • AreaUnit: The units an area can be shown in.
  • AreaUnitMessageKey: The message key that names an area unit in words, with the count it takes.
  • BasemapAttributionEntry: One credit line a tile provider requires.
  • BasemapCatalogue: The basemaps a host offers, with the one used when nothing, or nothing known, has been chosen.
  • BasemapDefinition: A basemap, as data.
  • BasemapSource: Where a basemap's pixels come from.
  • BottomSlotLayout: Offsets that keep the bottom slots clear of the surfaces above them.
  • BoundingBox: A bounding box as [west, south, east, north], in degrees.
  • Bounds: A geographic bounding box in decimal degrees.
  • BufferOptions: Options for buffer.
  • CachedResponse: What a request returns to the cache: a value and how long it stays fresh.
  • CardSpec: What a feature's card shows.
  • CatalogueChange: What a change to the layer catalogue did, for announceCatalogueChange.
  • CatalogueFailure: Why a catalogue could not be loaded: the request failed, or its payload was not a list.
  • CatalogueRefresh: Where a refresh of a catalogue that already has a list has got to.
  • CatalogueState: What a LayerCatalogue holds.
  • CategoricalSlot: One categorical colour.
  • CategoryColour: Colour by category, for alert levels and kinds.
  • ChromeLayout: How the map options surface is presented.
  • ClipboardFailureReason: The reasons a copy can fail.
  • ClipboardResult: The result of a copy.
  • ControlBase: The fields every layer control has, whatever its kind.
  • ControlCondition: Makes a control usable only while another control has one of some values, such as "Include smaller earthquakes" only for the hour and the day.
  • ControlValues: The value of each of a layer's controls, as strings, by control id.
  • CoordinateWords: The whole words a language writes in a coordinate: the four directions and the degree, minute and second.
  • CreateMessageCatalogueOptions: Optional controls for host translations and the fallback record.
  • DateBound: A calendar date: an ISO YYYY-MM-DD string, or a day relative to today (UTC).
  • DateControlDefinition: A calendar day, bounded on both sides.
  • DateTimeBound: A slot of a date and time control: a UTC YYYY-MM-DDtHHMM string on the control's step, such as 2000-06-01t0000, or a time relative to now.
  • DateTimeControlDefinition: A UTC date and a time of day on a fixed step, such as the half hours of a product the provider names by timestamp.
  • DaySlot: One slot a day offers, with its start time as the label, such as 14:30.
  • Decoder: Turns a raw response into features, mapping fields by the definition's paths.
  • DecoderRegistry: Decoders by name, as a definition's decoder names them.
  • Deferred: A HeldCall plus the promise a fake awaits.
  • DefinitionText: Text a definition shows a person: a MessageKey, looked up in the active catalogue where the definition is rendered; a HostText, a host's own key with its…
  • DefinitionTextProblem: One problem checkDefinitionTexts found, and the key it is in.
  • DefinitionTextProblemKind: What checkDefinitionTexts found wrong with one key:
  • DensifiedPath: A path cut into short pieces, and where each given position ended up in it.
  • DerivedVariable: A URL variable computed from control values with a lookup table, for feeds whose file names combine several choices.
  • DetailSource: A second source fetched only when someone asks for it on one feature, such as an event's affected area.
  • DetentHeights: Visible height in pixels of each detent.
  • DevicePreferencesValue: The device and accessibility preferences the interface adapts to.
  • DirectionStop: One place a route passes through.
  • DistanceUnit: The units a distance can be shown in.
  • DistanceUnitMessageKey: The message key that names a distance unit in words, with the count it takes.
  • DrawAction: An event that may change the drawing.
  • DrawEvent: What the last action did, for the interface to announce.
  • DrawHistoryEntry: One undo step: the shapes and the selection as they were.
  • DrawIssue: Why a shape, or an edit of one, is not allowed.
  • DrawKeyCommand: What a key press asks of the draw tool.
  • DrawKeyEvent: The parts of a keyboard event the draw shortcuts read.
  • DrawKind: What a shape is: a single position, a path, an area or a circle.
  • DrawnLayer: A data layer as an engine draws it, lowest first, for tests and the map adapter contract to compare adapters by.
  • DrawSelection: What the current selection points at: a shape, and optionally one of its vertices.
  • DrawShape: One drawn shape.
  • DrawShapeInput: A shape as it is given to load: everything but the generated fields.
  • DrawState: Everything the draw tool knows.
  • FakeFeatureQueryFailure: The failures FakeFeatureQuery can script.
  • FakeFileOpenFailure: What the fake can be made to fail with before a file is chosen.
  • FakeLocationProviderOptions: Options for FakeLocationProvider.
  • FakeMapAdapterOptions: Options for FakeMapAdapter.
  • FakeMessageCatalogueOptions: Options for FakeMessageCatalogue.
  • FakeRoutingFailure: The failures FakeRoutingProvider can script.
  • FakeServiceHandles: The fakes behind a FakeServices, for scripting and inspection.
  • FakeServices: A complete Services built from fakes, plus handles to script them.
  • FeatureFilter: Keeps the features whose decoded field equals one of in.
  • FeatureQueryErrorKind: Why a query for the features inside an area failed: the request failed (network), it was not valid or the answer could not be read (invalid), the host cannot…
  • FeatureQueryRequest: What FeatureQuery needs.
  • FeatureRef: One selected feature: its layer's id and its own id, as a tap reports them.
  • FeedLayerDefinition: A layer of features from a feed: points with a point style (no kind), or polygons or lines with a shapes style.
  • FeedShapeStyle: A feed shape style whose label may use a host-keyed template.
  • FeedSource: A feed: one JSON document of point features, fetched when the layer is on.
  • FieldMap: Where each decoded field comes from: a field name mapped to a dotted path into a raw feature, such as properties.mag or geometry.coordinates.2.
  • FieldValue: A decoded field value.
  • FileOpenErrorKind: Why no file was opened: the person closed the picker or the caller cancelled (cancelled, which callers ignore), the file was larger than allowed (too-large),…
  • FileOpenOptions: What the person is asked to choose from, and how much may be read.
  • FileSaveFailureReason: The reasons a save can fail.
  • FileSaveResult: The result of offering a file.
  • FillPattern: How a polygon is hatched, so a fill's meaning never rests on colour alone.
  • FixedColour: One colour for every feature.
  • FocusTarget: The control that should receive focus when a surface closes.
  • FormatContext: What a formatter may know besides the value: the time now, for relative times, and the catalogue whose language its words and numbers are written in.
  • Formatter: Turns one decoded field into text for a card or list, or returns null when it cannot read the value, so the template leaves it out.
  • FormatterRegistry: Formatters by name, as card and list templates use them ({time|relative}).
  • FormatWktOptions: Options for formatWkt.
  • GeometryErrorKind: Why a geometry operation refused its input: the input is not valid GeoJSON or WKT (invalid), it holds no coordinates where the operation needs some (empty),…
  • GeometryInput: What the geometry helpers accept: a GeoJSON geometry, or a feature that holds one.
  • HandleGesture: A press on an edit handle that has not been released.
  • HandlePointer: What is pressing: a mouse or pen, or a finger.
  • HeatmapLayerDefinition: Point density from a feed or a query, drawn as a heatmap.
  • HeatmapSpec: How a heatmap is drawn.
  • HeatmapValue: A number a heatmap reads: fixed in the definition, or taken from one of the layer's range controls so the person can tune it.
  • HeldCall: A promise that settles when a test says so.
  • HeldReachableAreaCall: Handle for an area request held with FakeRoutingProvider.
  • HeldRouteCall: Handle for a route request held with FakeRoutingProvider.
  • HeldSearchCall: Handle for a request held with FakeSearchProvider.
  • HeldSuggestCall: Handle for a request held with FakeSuggestionProvider.
  • Hemispheres: The letters that name the four hemispheres, as a language writes them.
  • HostText: A host's own translatable definition text: a host-defined catalogue key and the text shown in the source language, which is also the fallback when the active…
  • IdentifiableLayerDefinition: A raster tile layer that answers a tap.
  • IdentifyAnnouncement: What to say about one tap, and how urgently.
  • IdentifyReport: What one tap on raster layers that answer a tap came to, for announceIdentified.
  • IdentifySource: Asks a service what a raster tile layer shows at a tapped place, as a WMS GetFeatureInfo request does.
  • IdentifyTarget: Where a tap landed, for a tile layer's identify request.
  • KeyedLayerText: A host-defined translation key and its source text for a layer template.
  • LanguageCatalogue: The languages a host offers, with the one used when nothing else matches and a way to load each one's messages.
  • LanguageOption: One language a host offers.
  • LatLng: A geographic position in decimal degrees (WGS 84).
  • LayerAttribution: A credit line a provider asks for.
  • LayerControlDefinition: Every kind of control a layer can offer.
  • LayerDefinition: One open data layer, as data.
  • LayerDefinitionBase: The fields every layer definition has, whatever its kind.
  • LayerDetailRequest: What LayerSource needs.
  • LayerErrorKind: Why a layer could not load: the request failed (network), the response could not be decoded (invalid), it held no features (empty, which only load and…
  • LayerFeature: One decoded feature: an id, its geometry and the fields its definition maps.
  • LayerGeometry: The geometry of a decoded feature: the GeoJSON types a layer can draw.
  • LayerIdentifyRequest: What LayerSource needs.
  • LayerLoadRequest: What LayerSource needs.
  • LayersUrlState: The data layers in a link: which are on, and their control values.
  • LayerTemplate: A literal layer template or a host-keyed template with source text.
  • Legend: A layer's legend, derived from its style so the two cannot disagree.
  • LegendEntry: One line of a legend.
  • LineDash: How a line or outline is dashed.
  • ListSort: A sort option for the list of loaded features.
  • ListSpec: What each row of the list of loaded features shows.
  • LocateOptions: Options for a single location request.
  • LocationErrorKind: Why finding the user's location failed.
  • LocationFix: A position fix.
  • LocationWatchHandlers: Callbacks for a continuous watch.
  • MapAdapterFactory: Builds a fresh, unmounted map adapter.
  • MapClickEvent: A pointer click on the map.
  • MapEditHandle: A point the person can press and drag, such as the vertex of a shape being edited.
  • MapEditHandleKind: What a draggable handle on the map stands for.
  • MapEngineErrorReason: Why a map engine failed: it could not start without WebGL, it could not load, it stopped working after it had loaded, toImage could not produce an image…
  • MapEvents: The events a map adapter emits, with their payloads.
  • MapFeature: One point of a feed layer, with its look already worked out from the layer's style, so the adapter draws without knowing any style rule.
  • MapFeatureHit: One feature of a data layer under a tap.
  • MapFeatureTap: A tap or click on a point, polygon or line of a feed layer: the topmost feature, and every feature under the tap (it included), topmost first and listed once…
  • MapFitOptions: Options for MapAdapter.
  • MapHandleDrag: One step of a press on an edit handle.
  • MapHeatmap: Point density drawn as a heatmap.
  • MapHeatmapSource: What a heatmap is made from: loaded points, or a vector tile source layer of points.
  • MapHeatmapStyle: How a heatmap is drawn.
  • MapImageDrawing: Marks to draw over the map in an image, with the two hex colours they use.
  • MapImageExportErrorKind: Why a requested image was not made: the request was not valid (invalid), the image would be larger than the size limits allow, or the device could not draw it…
  • MapImageMark: One thing the ui draws over the map itself, in positions, for an image to include.
  • MapImageOptions: Options for MapAdapter.
  • MapImageSize: The size of a map, in CSS pixels.
  • MapImageView: The area an image shows: a box to fit, or a centre and a normalised zoom.
  • MapKeyAction: What a key press on the focused map should do.
  • MapKeyEvent: The parts of a keyboard event the map shortcuts read.
  • MapKeyHelpEntry: One line of the keyboard help.
  • MapLookRule: How a vector tile layer picks the look of each of its features from one property.
  • MapMountOptions: Everything the adapter needs when it mounts.
  • MapMoveOptions: Options for moving the view.
  • MapPlacement: What it takes to place marks drawn over the map (the pin, the measure line, drawn shapes) on the screen: the map's shape, its view, and the adapter's project…
  • MapProjection: The shape the map is drawn in: a flat Web Mercator map, or a globe.
  • MapShapeLook: How one polygon or line is drawn, already worked out from its layer's style.
  • MapShapes: Polygons and lines drawn on request, such as an event's affected area.
  • MapStyledShape: One polygon or line of a styled shape layer.
  • MapStyledShapes: Polygons or lines drawn with a per-shape look, such as a choropleth.
  • MapTileLayerRecovered: What MapEvents carries: the layer and the tiles of the MapTileLayerSlow or MapTileLayerUnavailable report it ends, so a recovery for tiles the layer has since…
  • MapTileLayerSlow: What MapEvents carries: the layer and the tiles it is still waiting for, in the form of MapTileLayerUnavailable so a report that arrives after the layer was…
  • MapTileLayerUnavailable: What MapEvents carries.
  • MapTileOverlay: Raster tiles drawn over the basemap, such as satellite imagery or a WMS map.
  • MapVectorSource: A source of vector tiles.
  • MapVectorSourceLayer: One layer of a vector tile source, drawn as polygons or lines.
  • MapVectorTiles: A vector tile layer: one source, drawn from one or more of its source layers.
  • MarkerShape: The shapes a point marker can take, so colour is never the only signal.
  • MarkerStyle: How one feature is drawn, worked out from its definition's style.
  • MeasurementReading: A rounded measurement and the unit it is in.
  • MemoryFeatureSelectionOptions: Options for MemoryFeatureSelection.
  • MemorySettingsStoreOptions: Options for MemorySettingsStore.
  • Message: A piece of text as a key and its parameters, with no language chosen yet.
  • MessageArgs: The parameters a Message carries: those of the key, except that a text placeholder may also hold another message, which is formatted first (a distance inside…
  • MessageCatalogueCall: One recorded call to FakeMessageCatalogue or .plural.
  • MessageCatalogueCheckOptions: What checkMessageCatalogue allows beyond its rules.
  • MessageCatalogueProblem: One problem checkMessageCatalogue found, and the key it is in.
  • MessageCatalogueProblemKind: What checkMessageCatalogue found wrong with one key:
  • MessageJoiner: The keys that place two messages one after the other, each with {first} and {second}.
  • MessageKey: A key into the shipped message catalogue.
  • MessageParams: The parameters every MessageKey takes, keyed by the key itself.
  • MessagePart: Text that fills a string placeholder of a Message: plain text, a nested message, or a HostText that the one place that speaks the sentence translates.
  • MessageValue: What a placeholder can be filled with.
  • NamedRegistry: A read-only set of named plug-ins, such as decoders or formatters.
  • OpacityControlDefinition: How opaque a tile overlay is, from 0.1 to 1.
  • OpenedFile: A file the person chose, read as text.
  • OrdinalSlot: One step of the ordered ramp.
  • PaletteSlot: A colour from the data palette, by name (see PALETTE_SLOTS).
  • ParsedHandleId: What a handle id names.
  • ParseWktOptions: Options for parseWkt and readWktSequence.
  • PartitionedDefinitions: The valid definitions in a list, and what was wrong with the others.
  • PixelPoint: A pixel position relative to the top-left corner of the map host element.
  • PlacedPath: A path placed on the screen by placePath.
  • PointInPolygonOptions: Options for pointInPolygon.
  • PointInput: A position to test: [lng, lat], a map position or a GeoJSON point.
  • PointStyle: How a feed's points are drawn, and so what its legend says.
  • PolygonalGeometry: A geometry that covers an area.
  • Position: A longitude and latitude pair, in that order, as GeoJSON writes it.
  • ProjectedHandle: A handle that has been placed on the screen.
  • QueryArea: The area a feature query searches: a GeoJSON Polygon, an outer ring and then any holes, each ring closed, as [longitude, latitude] positions.
  • QueryLayerDefinition: A layer whose features come from a query for the current view.
  • QuerySource: A feed that is asked only for the features inside the current view, for a dataset too large to fetch whole.
  • RangeControlDefinition: A number between two bounds, such as a heatmap's radius.
  • ReachableAreaFeature: One area that can be reached within a time.
  • ReachableAreaRequest: A request for the area reachable from a place within a time.
  • ReachableAreaResult: The areas reachable from an origin: usually one, and more when the network is split.
  • ReadingDirection: The reading direction of a page or element.
  • RecordedLayerRequest: A request the fake received, with the URL a real source would fetch.
  • RecordedReverseCall: A recorded call to FakeSearchProvider.
  • RecordedSearchCall: A recorded call to FakeSearchProvider.
  • RecordedSuggestCall: A recorded call to FakeSuggestionProvider.
  • RelativeDate: A date relative to today in UTC, so a definition never hard-codes a day that goes stale.
  • RelativeTime: A time relative to now, so a definition can follow a provider's latency: { minutesAgo: 360 } is six hours ago, rounded down to the control's step.
  • RequestedImage: A request with every default filled in and its size checked.
  • ResolvedTheme: The theme actually shown.
  • RouteLeg: One stretch of a route, between two consecutive stops.
  • RouteLineGeometry: A line of [longitude, latitude] positions, as GeoJSON writes a LineString.
  • RouteRequest: A request for a route through the stops, in order.
  • RouteResult: A route: one line feature for each leg, with totals.
  • RoutingErrorKind: Why a route or a travel-time area could not be found: the request failed (network), it was not valid (invalid), no route links the stops (no-route), the…
  • RoutingRequestKind: What a routing request was for, which changes how a missing result is worded.
  • RuntimeLayerCatalogue: A LayerCatalogue that loads its definitions when the app runs.
  • RuntimeLayerCatalogueOptions: What createRuntimeLayerCatalogue needs from the host.
  • SavedFile: A file the person is offered to keep.
  • ScaleBar: A scale bar ready to draw and to read aloud.
  • ScaleBarInput: What the scale bar needs to know.
  • SearchErrorKind: Why a place search failed.
  • SearchOptions: Options for a search or a reverse lookup.
  • SearchResult: A place a search found.
  • SegmentedControlDefinition: A choice of a few values, drawn as a segmented control.
  • SegmentedOption: One option of a segmented control.
  • SelectionHit: One feature a query found: its layer's id and the feature itself, so the caller can show it without loading its layer.
  • Services: Everything the ui may use from outside itself.
  • Settings: Everything the app remembers between visits.
  • ShapeAppearance: How one polygon or line is drawn, worked out from its definition's style, without its words.
  • ShapeCategory: One category of a polygon or line style.
  • ShapeCategoryColour: Colour by category: a field's value picks the class.
  • ShapeColour: How a polygon or line layer is coloured.
  • ShapeEvaluator: Picks a feature's ShapeLook from its fields.
  • ShapeFixedColour: One colour for every polygon or line.
  • ShapeImport: What a file held: a refusal of the whole file, or the shapes that can be drawn with a count of those skipped for each reason and of the polygons whose holes…
  • ShapeImportOptions: Options for parseShapeFile.
  • ShapeImportRefusal: Why a whole file was refused.
  • ShapeImportSkip: Why one shape in a file was skipped while the rest were imported.
  • ShapeIntervalColour: Graduated colour in equal intervals over a numeric field.
  • ShapeLabel: Text drawn on each polygon or line, filled from the feature's fields.
  • ShapeLook: How one polygon or line is drawn, and the words for its class.
  • ShapeMarks: Marks a class can carry beside its colour.
  • ShapeMeasure: The measures of a shape, in metres and square metres.
  • ShapeStep: One value range of a polygon or line style, from explicit stops.
  • ShapeStepColour: Graduated colour from explicit stops (class breaks).
  • ShapeStyle: How polygons or lines are drawn: a fill (or a stroke, for lines) coloured by a rule, with outline width, hatching, dashing and labels.
  • SharedResponseCacheOptions: Options for SharedResponseCache.
  • SheetDetent: The heights the bottom sheet rests at.
  • SheetSection: The sections of the sheet.
  • ShippedKeyHelpEntry: A line of the SDK's own keyboard help, written in message keys only.
  • SizeStops: Marker radius by value: the radius of the last stop at or below the value.
  • SkippedDefinition: A definition a catalogue left out, with what was wrong with it.
  • StepColour: Colour by ordered value ranges, using an ordered (ordinal) palette.
  • StyleCategory: One category of a categorical style.
  • SuggestOptions: Options for one suggestion request.
  • SurfaceAction: An event that may change which surface is open.
  • SurfaceKind: The one surface that is open over the map, or "none".
  • SurfaceState: Everything the chrome needs to know about which surface is open.
  • SwitchControlDefinition: An on and off choice.
  • TemplatePlaceholder: One {name} or {name|formatter} in a template.
  • ThemeChoice: The theme the user chose.
  • ThemeDefaultIds: The ids of the basemaps a catalogue shows by default in each interface theme.
  • TileLayerDefinition: A raster overlay.
  • TileSource: Raster tiles drawn as an overlay, such as WMTS imagery or a WMS map.
  • TourAction: An event that may move the tour.
  • TourAdvance: What finishes a tour step when the person does it.
  • TourSnapshot: The app state a tour step's TourAdvance reads.
  • TourState: Where the tour is: off, showing the welcome card, on a step, or showing the ending card.
  • TravelMode: How the traveller moves, which decides the roads and the speed.
  • UnitSystem: Measurement units.
  • UrlStateValue: The shareable parts of the app state.
  • ValidateOptions: Options for validateGeometry.
  • ValidationOptions: What validation checks names against.
  • VectorHeatmapLayer: One layer of a vector tile source whose points are drawn as a heatmap.
  • VectorShapeLayer: One layer of a vector tile source, drawn as polygons or lines.
  • VectorSourceLayer: Either way a vector tile source layer can be drawn.
  • VectorTileLayerDefinition: A vector tile layer: one source, drawn from one or more of its source layers, each with its own style and zoom window.
  • VectorTileSource: Vector tiles drawn by the map engine, styled per source layer.
  • ViewState: The visible part of the map.
  • VisibleMap: The map on screen, which a request falls back to where it names no size or view.
  • WebMercatorPoint: A position in Web Mercator (EPSG:3857), in metres.
  • WktAxisOrder: The order of the first two numbers of a position in WKT text: lng-lat (longitude, then latitude, as the OGC standard and GeoJSON have it) or lat-lng, which…
  • ZoomButtonVisibility: Whether to show the zoom buttons, and whether height alone hid them.
  • ZoomLimit: Which way to zoom for a layer to show, and to which normalised zoom level.