Skip to content
LoidoltTheme 0.11.1
Svelte 5

Component

MapPopup

A non-modal panel pointing at a spot on the map.

import { MapPopup } 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.

Notes

  • Named by label; focus moves in when it opens and back when it closes. Square, on the surface, without MapLibre’s tip.

Props

Generated from the component source, so it cannot drift from the implementation.

MapPopup props
PropTypeDefaultNotes
label required string—Names the popup for assistive tech, e.g. the place it describes.
lngLat required LngLat—Where the popup points.
children Snippet—
class string—
closeLabel string'Close'
closeOnClick booleantrueClose when the map itself is clicked.
offset number12Distance from lngLat, in pixels.
onOpenChange (open: boolean) => void—
open bindablebooleanfalseBindable.