flywave-mapview.mapanchor
Home > @flywave/flywave-mapview > MapAnchor
MapAnchor type
An interface describing [[THREE.Object3D]]s anchored on given .
Signature:
export type MapAnchor<T extends THREE.Object3D = THREE.Object3D> = T & {
geoPosition?: GeoCoordinates;
anchor?: GeoCoordLike | Vector3Like;
pickable?: boolean;
styleSet?: string;
category?: string;
overlay?: boolean;
};
Example
Example:
const mesh: MapAnchor<THREE.Mesh> = new THREE.Mesh(geometry, material);
mesh.anchor = new GeoCoordinates(latitude, longitude, altitude);
mapView.mapAnchors.add(mesh);