Documentation - v20.0.0-dev
    Preparing search index...

    A geolocated map plane rendered as a grid of textured tiles, backed by leaflet for tile fetching and lat/lng projection. Drawn outside the engine (three.js planes, its container), not picked. Its shape and size cut the planes through a mask, one canvas over the whole grid given to each plane as its alphaMap on its own part (on both backends).

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    children: SceneObject[] = ...
    container: Group
    controller: SceneObjectController<SceneObject> | null = null

    The controller handling it while it is in the scene, set when that controller adds it (see SceneObjectController.addObject); null out of the scene.

    isInit: boolean = false
    isMapContainer: true
    isRaycastable: boolean = true

    Whether the viewport's picking may hit it.

    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: Signal<(latLng: LatLng) => void>;
        onOpacityChanged: Signal<(opacity: number) => void>;
        onRotationChanged: Signal<(angle: number) => void>;
        onShapeChanged: Signal<(shape: MapShape) => void>;
        onSizeChanged: Signal<(size: number) => void>;
        onTransformChanged: Signal<() => void>;
        onTypeChanged: Signal<(shape: MapType) => void>;
        onVisibilityChanged: Signal<() => void>;
    } = ...
    size: number = 0
    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 layer(): MeshLayer

      The layer it is drawn in (the engine's MeshLayer, Layer1 by default): a layer is drawn over the layers below it, whatever their depth. Given to its engine objects; kept only by an object without.

      Returns MeshLayer

    • set layer(value: MeshLayer): void

      Parameters

      Returns void

    • get mapDeltaCoordinates(): Vector3

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

      Returns Vector3

    • set mapDeltaCoordinates(mapDeltaCoordinates: Vector3): void

      Parameters

      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

      Whether it is selected; its controller's onObjectSelectedChanged tells a change.

      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

    • Its state for toJson: a subclass adds its own after these.

      Returns Record<string, unknown>

    • The sections of its type for toJson, after its transform: none here.

      Returns Record<string, unknown>

    • 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

    • Returns void

    • Its planes' bounds, cut to its size; empty while hidden or without planes (not placed).

      Parameters

      Returns Box3

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

      Returns LatLng

    • 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

        Map position in 3D space

      • 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>

    • Reset the offset

      Returns void

    • Set the new map coordinates

      Parameters

      • latLng: LatLng

        new Latitude and Longitude for the map

      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

    • 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

    • Everything about it for a debug view (the infobox's 3D data), in sections and in this order: identity, state, transform, its type's own sections (_getTypeJson: a mesh's material, edges and engine objects), userData, and its children by name, uuid and type. Not a persistence format.

      Returns Record<string, any>