Skip to content

Integration with the MDK

The GiPStech Way-Fi library is primarily designed to be used in conjunction with the GiPStech MDK (Mobile Development Kit), although it can also operate as a standalone component.

The MDK facilitates the retrieval of Way-Fi layers along with building and region data through auxiliary files marked with the Purpose.WAYFI enum. Starting from version 3.2.0, the MDK retrieves only auxiliary files with Purpose.INTERNAL by default. To include Way-Fi layers when downloading buildings and regions data, add Purpose.WAYFI to the SpatialManager.

While, in principle, buildings and regions may contain any type of file labeled with Purpose.WAYFI, at GiPStech we follow a specific convention:

  • Buildings: Each floor of a building has an associated auxiliary file with Purpose.WAYFI. The filename is <floor_id>.wfl, and the corresponding Way-Fi layer is named after the floor ID (without the extension).
  • Regions: Each outdoor level is associated with an auxiliary file named out_<level>_<unique_id>.wfl, and the corresponding Way-Fi layer is named after the name of the file (without the extension).

Examples

The following example shows how to add a purpose for Way-Fi so that subsequent requests also download the Way-Fi layers:

SpatialManager.addAuxPurpose(AuxiliaryFile.Purpose.WAYFI)

The following example demonstrates how to import all Way-Fi layers associated with a building:

for (file in building.findAuxiliaryFiles(AuxiliaryFile.Purpose.WAYFI)) {
    wayFinder.loadLayer(file.nameWithoutExtension, file.path)
}

The source and destination points can then be set by specifying the corresponding floor ID as the layer name.

Similarly, the example below shows how to import all Way-Fi layers for a region, including the layers of all buildings contained within it:

for (file in region.findAuxiliaryFiles(AuxiliaryFile.Purpose.WAYFI)) {
    wayFinder.loadLayer(file.nameWithoutExtension, file.path)
}

Buildings can be excluded by explicitly passing false to the includeIndoor parameter.