Documentation - v19.2.0-dev
    Preparing search index...

    Create a new plane with a map texture using leaflet

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    children: SceneObject[] = ...
    container: Group
    isDisplayable: true
    isInit: boolean = false
    isMapContainer: true
    isRaycastable: boolean = true
    isSceneObject: true
    isSelectable: boolean = true

    Indicates whether the object is selectable in the scene

    isTransformable: boolean = true
    mapType: MapType = MapType.default
    name: string = ''
    parent: SceneObject | null = null
    shape: MapShape = MapShape.square
    signals: {
        onLatLngChanged: ViewerSignal<(latLng: LatLng) => void>;
        onOpacityChanged: ViewerSignal<(opacity: number) => void>;
        onRotationChanged: ViewerSignal<(angle: number) => void>;
        onSelectedChanged: ViewerSignal<(...args: any[]) => any>;
        onShapeChanged: ViewerSignal<(shape: MapShape) => void>;
        onSizeChanged: ViewerSignal<(size: number) => void>;
        onTransformChanged: ViewerSignal<() => void>;
        onTypeChanged: ViewerSignal<(shape: MapType) => void>;
        onVisibilityChanged: ViewerSignal<(...args: any[]) => any>;
    } = ...
    size: number = 0
    transformConfig: ObjectTransformConfig = ...
    userData: Record<string, any> = {}
    uuid: string

    Unique identifier of the object

    Accessors

    • get active(): boolean

      Returns boolean

    • get azimuth(): number

      Current map rotation in degrees

      Returns number

    • get center(): LatLng

      Current map latitude and map longitude

      Returns LatLng

    • get elevation(): number

      Elevation of the map : its position on the Y axis

      Returns number

    • get initLat(): number

      Returns number

    • get initLng(): number

      Returns number

    • get mapDeltaCoordinates(): Vector3

      Center of the map when the twin is entirely loaded (no filters)

      Returns Vector3

    • set mapDeltaCoordinates(mapDeltaCoordinates: Vector3): void

      Parameters

      • mapDeltaCoordinates: Vector3

      Returns void

    • get maxSizeMeters(): number

      Max map size available in meters

      Returns number

    • get opacity(): number

      Current opacity

      Returns number

    • get selected(): boolean

      Returns boolean

    • set selected(value: boolean): void

      Parameters

      • value: boolean

      Returns void

    • get type(): string

      Returns string

    • get visible(): boolean

      Whether the map is visible or not

      Returns boolean

    • set visible(visible: boolean): void

      Set the visibility of the map

      Parameters

      • visible: boolean

      Returns void

    Methods

    • Parameters

      • matrix: Matrix4

      Returns void

    • center the lat and lng to the mapDeltaCoordinates point in 3D to always have the map lat/lng center in the same position

      Parameters

      • center: Vector3

        the center of the scene

      Returns void

    • Get the current latLng of the map with the offset removed to save the map in the correct position

      Returns LatLng

    • Parameters

      • target: Matrix4

      Returns Matrix4

    • Parameters

      • target: Vector3

      Returns Vector3

    • Init the map container with the given data

      Parameters

      • mapDeltaCoordinates: [number, number, number]

        Center of the map when the twin is entirely loaded (no filters)

      • latLng: LatLng

        Coordinates (latitude and longitude)

      • azimuth: number

        Rotation in degrees

      • position: Vector3
      • initOpacity: number

        The initial map opacity

      • shape: MapShape

        Map shape

      • size: number

        Map size in meters

      • visible: boolean

        Map visibility

      • nbOfPlanesPerLine: number

        Number of planes (meshes) per line

      • planeSize: number

        Size of one plane in meter

      • type: MapType

        Type of map to load

      Returns Promise<void>

    • Parameters

      • point: Vector3
      • target: Vector3
      • maxEdgeDistance: number

      Returns boolean

    • Performs raycasting on the mesh.

      Parameters

      • raycaster: Raycaster

        The raycaster to use

      • intersects: SceneIntersection[]

        The array of resulting intersections

      Returns void

    • Reset the offset

      Returns void

    • Set the new map coordinates

      Parameters

      • latLng: LatLng

        new Latitude and Longitude for the map

      Returns void

    • Parameters

      • matrix: Matrix4

      Returns void

    • Set the number of planes per line

      Parameters

      • nbOfPlanes: number

      Returns void

    • Set the new map opacity

      Parameters

      • opacity: number

        new map opacity

      Returns void

    • Set the size of one plane (in meters)

      Parameters

      • size: number

      Returns void

    • Parameters

      • position: Vector3

      Returns void

    • Set the new map rotation

      Parameters

      • angle: number

        new map angle in degrees

      Returns void

    • Set the new map shape

      Parameters

      Returns void

    • Set the new map size

      Parameters

      • size: number

        new map size in meters

      Returns void

    • set the new map type

      Parameters

      Returns void

    • Returns Record<string, any>