Skip to main content

MapHandleEvents

What a map reports, by event name. Payloads are plain data.

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

Signature​

import type { MapHandleEvents } from "@mapcairn/map";

interface MapHandleEvents

Properties​

click​

readonly click: LatLng;

The map was clicked or tapped at this position.

error​

readonly error: MapEngineError | MountMapError;

The engine failed (MapEngineError), or the layers a page gave cannot all be used (MountMapError): the function that loads them failed (kind layers-unavailable), or a layer it returned was left out because it is not valid or needs services.layerSource (kind invalid-option).

featuretap​

readonly featuretap: MapFeatureTap;

A point, shape or line of a layer was tapped. Not emitted while the measure, draw or directions tool is on.

noticeaction​

readonly noticeaction: NoticeAction;

The button of a notice the page worded was pressed: today the action of engineNotice. What it does is the page's to decide. In releases after 0.2.0, not in 0.2.0 or any earlier release.

viewchange​

readonly viewchange: ViewState;

The map stopped moving: the view it now shows.

See also​

Source: packages/map/src/element/types.ts:282