Mappedin JS - v6.14.0
    Preparing search index...

    Interface Query

    Query allows users to query for nodes, locations, categories, and other points of interest within the venue.

    interface Query {
        at(coordinate: Coordinate): Promise<TQueryAtResult[]>;
        nearest<T extends TQueriables>(
            origin: Coordinate | Annotation | Door | PointOfInterest | Node,
            include: T[],
            options?: TFindNearestOptions,
        ): Promise<TFindNearestResult<T> | undefined>;
    }
    Index

    Methods

    Methods

    • Find all geometry objects (Spaces, MapObjects, Areas, Floors) at the given coordinate. If the coordinate has a floorId, only that floor is searched. If no floorId is provided, all floors are searched.

      Parameters

      • coordinate: Coordinate

        The coordinate to search at

      Returns Promise<TQueryAtResult[]>

      Array of Spaces, MapObjects, Areas, and Floors that contain the coordinate

      // Find all geometry at a coordinate with a floor
      const coord = new Coordinate({ latitude: 43.861, longitude: -78.947, floorId: 'floor1' });
      const results = await mapData.Query.at(coord);
      // results may contain [Space, Floor, Area, ...]

      // Find all geometry at a coordinate across all floors
      const coordNoFloor = new Coordinate({ latitude: 43.861, longitude: -78.947 });
      const allResults = await mapData.Query.at(coordNoFloor);