Component
MapControl
Any content as a map control, stacked in a corner with MapLibre’s own.
import { MapControl } from '@loidolt/theme-maps';
Example
Focus the map to move it: arrow keys pan, plus and minus zoom, Shift with the arrows rotates and tilts.
Props
Generated from the component source, so it cannot drift from the implementation.
| Prop | Type | Default | Notes |
|---|---|---|---|
children | Snippet | — | |
class | string | — | |
position | Corner | 'top-left' | The corner it sits in, stacked with MapLibre's own controls there. |
ref bindable | HTMLDivElement | null | null |
Plus the attributes of HTMLAttributes<HTMLDivElement>, forwarded to the root element.