Svelte Maplibre

API / Map

MapEvents

Listen to events on the map from inside a MapLibre component. Each on* prop adds a listener for the event with the same name.

Set layer to listen only to mouse events on that layer, such as click, mousemove, or contextmenu. This component does not render anything.

import { MapEvents } from 'svelte-maplibre';

Examples

Props

Source: src/lib/MapEvents.svelte