跳到主要内容

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 & &#123;
geoPosition?: GeoCoordinates;
anchor?: GeoCoordLike | Vector3Like;
pickable?: boolean;
styleSet?: string;
category?: string;
overlay?: boolean;
&#125;;

Example

Example:

const mesh: MapAnchor<THREE.Mesh> = new THREE.Mesh(geometry, material);
mesh.anchor = new GeoCoordinates(latitude, longitude, altitude);
mapView.mapAnchors.add(mesh);