MapCairnMapEventMap
The events a <mapcairn-map> sends, by name. Each is a CustomEvent that
bubbles, with what happened in detail. They carry
a prefix because a bare click is the browser's own.
This is an interface exported by @mapcairn/sdk/browser, checked against version 0.2.0.
Signature
import type { MapCairnMapEventMap } from "@mapcairn/sdk/browser";
interface MapCairnMapEventMap
Properties
"mapcairn-click"
"mapcairn-click": CustomEvent<LatLng>;
The map was clicked or tapped: detail is the position.
"mapcairn-error"
"mapcairn-error": CustomEvent<MapEngineError | MountMapError>;
Something went wrong: detail is a MountMapError when the map could not
be drawn from what the element was given, and a MapEngineError when the
engine failed.
"mapcairn-feature-tap"
"mapcairn-feature-tap": CustomEvent<MapFeatureTap>;
A point, shape or line of a layer was tapped.
"mapcairn-notice-action"
"mapcairn-notice-action": CustomEvent<NoticeAction>;
The button of a notice the page worded was pressed: detail.notice names
it. Sent only for the action of engineNotice, and what it does, such as
reloading the page, is the page's to decide. detail.notice is a text, and
"engine" is the one known today, so a listener needs a default for
another. In releases after 0.2.0, not in 0.2.0 or any earlier release.
"mapcairn-view-change"
"mapcairn-view-change": CustomEvent<ViewState>;
The map stopped moving: detail is the view it now shows.