Skip to content
LoidoltTheme 0.11.1
Svelte 5

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.

MapControl props
PropTypeDefaultNotes
children Snippet—
class string—
position Corner'top-left'The corner it sits in, stacked with MapLibre's own controls there.
ref bindableHTMLDivElement | nullnull

Plus the attributes of HTMLAttributes<HTMLDivElement>, forwarded to the root element.