For AI agents: a documentation index is available at /llms.txt. Markdown versions of all pages are available by appending .md to any URL.
Type Alias AnnotationPosition
Example
// On the model's surface at the center of its bounding box, following the model around.
splatModel.addAnnotation({ pos: { x: 0, z: 0 }, label: "Center" });
// On whatever is at a fixed spot on the map, regardless of where the model is.
splatModel.addAnnotation({ pos: { lng: -80.2782, lat: 25.7408 }, label: "Pool" });
// Hovering slightly above the surface.
splatModel.addAnnotation({ pos: { x: 0.5, z: -0.5, y: 0.001 }, label: "Roof" });
Position of an annotation, either relative to its SplatModel (see ModelAnnotationPosition) or at a geographic location (see GeoAnnotationPosition). The two are told apart by their keys: a position with a
latis geographic.Either way, the annotation sits on top of whatever is below it: the model's surface, or the terrain where the model has a hole or doesn't reach. It follows that surface as the model or annotation moves. The optional
ylifts the annotation above it (or lowers it, if negative), in the SDK's internal world units - where 1 unit is the size of a zoom level 14 map tile, i.e. roughly 2.4 km at the equator, and less towards the poles. Defaults to0.The model's surface requires the model to come with a collision mesh. Without one, annotations sit on the terrain even where the model is. Until the terrain is loaded (and always with the VOID basemap), they sit at the terrain's height at the model instead.