Markers & Annotations@knitui/map
Layer Annotation
LayerAnnotation renders custom content at a coordinate as part of the map's layer stack (the native MarkerView/annotation primitive). It supports animated movement and an onPress handler. On web the children render as a positioned overlay.
WebiOSAndroidnative split8 own props2 examples
import { LayerAnnotation } from "@knitui/map";Playground
Loading playground…
<LayerAnnotation
lngLat={AMSTERDAM}
/>Examples
Single
Custom content anchored at a single coordinate.
Loading example…
Multiple
A couple of layer annotations across several cities.
Loading example…
Props
| Prop | Type | Default | Description |
|---|---|---|---|
lngLat required | [longitude: number, latitude: number] | — | |
animated | boolean | undefined | — | |
animationDuration | number | undefined | — | |
animationEasingFunction | ((x: number) => number) | undefined | — | |
children | ReactNode | — | |
id | string | undefined | — | |
onPress | ((event: PressEventWithFeatures) => void) | undefined | — | |
testID | string | undefined | — |