Type alias MapAnchor<T>

MapAnchor<T>: T & {
    anchor?: GeoCoordLike | Vector3Like;
    category?: string;
    geoPosition?: GeoCoordinates;
    overlay?: boolean;
    pickable?: boolean;
    styleSet?: string;
}

An interface describing [[THREE.Object3D]]s anchored on given @xyzmaps/harp-geoutils#GeoCoordinates.

Type Parameters

  • T extends THREE.Object3D = THREE.Object3D

Type declaration

  • Optional anchor?: GeoCoordLike | Vector3Like

    The anchor of this Object3D in @xyzmaps/harp-geoutils#GeoCoordinates or world coordinates.

  • Optional category?: string

    The category of this style.

    Remarks

    This property is used together with [[Theme.priorities]] to compute the render order of this map object.

  • Optional geoPosition?: GeoCoordinates

    The position of this [[MapAnchor]] in @xyzmaps/harp-geoutils#GeoCoordinates.

    Deprecated

    Use [[anchor]] instead.

  • Optional overlay?: boolean

    Whether to draw the anchor on top of labels.

    Default Value

    false

  • Optional pickable?: boolean

    Flag defining if the object may be picked.

    Note

    By default all objects are pickable even if this flag is undefined.

  • Optional styleSet?: string

    The styleSet that owns this map object.

    Remarks

    This property is used together with [[Theme.priorities]] to compute the render order of this map object.

Remarkks

Example

Example:

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

Generated using TypeDoc