For AI agents: a documentation index is available at /llms.txt. Markdown versions of all pages are available by appending .md to any URL.
Interface AnnotationOptions
color?: Color;
data?: unknown;
icon?: string;
label?: string;
popup?: string;
popupPlacement?: AnnotationPopupPlacement[];
popupWidth?: number;
pos: AnnotationPosition;
}
Properties
Optionalcolor
Color of the annotation label body. Defaults to MapTiler blue. Can be changed later
with SplatAnnotation.setColor().
Optionaldata
Custom data of any kind to attach to the annotation, e.g. the ID of the
database row it was created from. It is never read by the SDK, and can be
retrieved and replaced later on with SplatAnnotation.getData() and
SplatAnnotation.setData() - e.g. from within the annotation's event listeners.
Optionalicon
Single emoji shown by itself when the annotation is collapsed (active); also always prepended to the label text when the annotation is expanded.
Optionallabel
Short string to display in the annotation label.
Optionalpopup
HTML string of a modal popup that opens when one clicks the annotation label.
OptionalpopupPlacement
The sides of the annotation on which the popup may open, in order of
preference: the first side with enough room on the map is used. For
example, ["top", "bottom", "left", "right"] opens the popup above
the annotation, below it if there's no room above, and only then to its left
or right. Must hold 1 to 4 entries, each side at most once - anything
else makes addAnnotation throw. Defaults to ["right", "left", "top", "bottom"].
OptionalpopupWidth
Width of the popup in CSS pixels, replacing the default of 300 (or
240 on touch devices and small screens). It is still capped to fit on
the map. Must be a positive number - anything else makes addAnnotation throw.
pos
3D position of the annotation, relative to the SplatModel's bounding box or at a geographic location - see AnnotationPosition.
Options for creating an Annotation in a SplatModel instance.