Skip to main content

MountServices

The providers a page writes itself. Each is optional. A tool that needs one ("search", "directions", "locate") is left out, with one warning that names the fix, when it is missing.

This is an interface exported by @mapcairn/sdk/browser, checked against version 0.2.0.

Signature​

import type { MountServices } from "@mapcairn/sdk/browser";

interface MountServices

Properties​

layerSource​

readonly layerSource?: LayerSource;

Loads the features of a layer that comes from a feed or a query, and answers a tap on a layer that identifies. Needed by such layers only.

location​

readonly location?: LocationProvider;

Finds where the person is. Throw LocationError when it cannot.

routing​

readonly routing?: RoutingProvider;

Finds routes and travel-time areas for the "directions" tool, which also offers a search for places when search is given. Throw RoutingError when it cannot. Give the credits its service asks for as credits; the map lists them while a route or area is drawn. In releases after 0.2.0, not in 0.2.0 or any earlier release.

readonly search?: SearchProvider;

Finds places by name. Throw SearchError when a search fails.

suggestions​

readonly suggestions?: SuggestionProvider;

Suggests places while a person types.

See also​

Source: packages/sdk/src/browser/types.ts:45