Points of Interest Repositories
The point of interest (POI) data domain contains three sub-domains that are relationally associated:
- PoiTypeGroupRepository: A POI type group is used to create a set of POI types. User permissions can be configured for the POI types within the group.
- PoiTypeRepository: A POI type is used to categorize POIs. POI icons and their zoom-level visibility can also be configured here.
- PoiRepository: POIs are points defined in the 3D coordinate system of a NavVis IVION site that have additional information attached to them. In addition to basic information (e.g. title and body text) you can add a unique icon and custom data and customize user permissions.
Creating a Custom POI Type Group
Note: Make sure that you are logged into NavVis IVION with admin rights.
To generate an empty POI type group object, set its name (here: "Utilities"), and persist the object to the database, run:
let utilitiesGroup: PoiTypeGroupInterface = api.poi.poiTypeGroupRepository.create();
utilitiesGroup.name = {"en": "Utilities"};
api.poi.poiTypeGroupRepository.save(utilitiesGroup);
Creating Custom POI Types
Note: We are using "Electricity" and "Networking" as examples here.
Selecting POIs and Assigning POI Types
Follow these steps to select POIs and assign them to POI types:
Note: As an example, we are:
- Selecting10 POIs starting from the 8th row of the database.
- Assigning the first 5 POIs to the "Electricity" type and the last 5 to the "Networking" type
Getting POIs of a Specific Type
You can retrieve POIs of a specific type by using a POI filter to build a query. Pass an array of POI types to the filter:
const electricityType: PoiTypeInterface = getElectricityType();
const poiFilterBuilder: PoiFilterInterface = api.poi.repository.createFilterBuilder();
const poiFilter: RestFilterInterface = poiFilterBuilder.poiType([electricityType]).build();
api.poi.repository.filter(poiFilter)
.then((electricityPois: PoiInterface[]) => {
// Perform some action
});
Getting POIs Using Geofencing
This example shows how to retrieve POIs by geofencing. There are two steps:
- Filter your POIs using a bounding box.
- Narrow the results, e.g. to a specific floor within the site model.
A bounding box is a 2-dimensional outline with a 3rd dimension that is infinite. It is defined by a min and max set of coordinates. On the 2D map in NavVis IVION:
- The min coordinate is the upper-left point.
- The max coordinate is the lower-right point.
Once a bounding box has been used to pre-filter POIs, the results can be narrowed by vertical space (the third dimension) by using the site model to set vertical boundaries. For this purpose, the site model must already be correctly generated in NavVis IVION.