NavVis IVION API
    Preparing search index...

    Interface SiteModelRepositoryInterface

    Site model data repository.

    The site model repository object enables standard create, read, update, and delete methods on site model entities. Additional helpful methods are provided that enable more advanced retrieval of site model entities.

    interface SiteModelRepositoryInterface {
        create(): SiteModelEntityInterface;
        filter(params: RestFilterInterface): Promise<SiteModelEntityInterface[]>;
        findAll(forceFetch?: boolean): Promise<SiteModelEntityInterface[]>;
        findByTypeAndDistance2D(
            type: SiteModelType,
            pos: Vector3,
            maxDist: number,
        ): Promise<SiteModelEntityInterface[]>;
        findClosestByTypeAndDistance2D(
            type: SiteModelType,
            pos: Vector3,
            maxDist: number,
        ): Promise<SiteModelEntityInterface>;
        findOne(
            id: number,
            forceFetch?: boolean,
        ): Promise<SiteModelEntityInterface>;
        findWithin(
            localLocation: Vector3 | Vector2,
            entityType?: SiteModelType,
        ): Promise<SiteModelEntityInterface[]>;
        generate(): Promise<SiteModelEntityInterface[]>;
        remove(item: SiteModelEntityInterface): Promise<void>;
        save(
            objects: SiteModelEntityInterface[],
        ): Promise<SiteModelEntityInterface[]>;
        updateAttributes(
            objects: SiteModelEntityInterface[],
        ): Promise<SiteModelEntityInterface[]>;
    }

    Hierarchy (View Summary)

    Index

    Methods

    • Gets all repository items. The cached data will be returned if the data has been fetched before. Using the forceFetch parameter, a user can order a fresh copy to be fetched from the server.

      Parameters

      • OptionalforceFetch: boolean

        Whether to bypass the cache and retrieve a fresh copy from the server.

      Returns Promise<SiteModelEntityInterface[]>

      Promise with the repository items.

    • Get one repository item by id. The cached data will be returned if the data has been fetched before. Use the forceFetch parameter to retrieve a fresh copy from the server. In case a new record is fetched, the data and dataMap will be updated accordingly.

      Parameters

      • id: number

        Identifier of the repository item

      • OptionalforceFetch: boolean

        Whether to bypass the cache and retrieve a fresh copy from the server.

      Returns Promise<SiteModelEntityInterface>

    • Find site model entities from a given local coordinate with optional site model type.

      Parameters

      • localLocation: Vector3 | Vector2

        Local point from which to find nearby site model entities.

      • OptionalentityType: SiteModelType

        Reduce search to include only the given site model type.

      Returns Promise<SiteModelEntityInterface[]>