Skip to content

Path finding

Michał Gasztold edited this page Sep 25, 2017 · 1 revision

Indoor Location API is capable to compute and return a list of geographical coordinates between two spots of the map. The method to find path is within UbuduMap object instance of which can be obtained from UbuduIndoorLocationManager:

UbuduMap map = mIndoorLocationManager.getMap();

To find path between two geographical points:

UbuduCoordinates2D coordsA = new UbuduCoordinates2D(52.199303, 21.024078, false);
UbuduCoordinates2D coordsB = new UbuduCoordinates2D(52.200513, 21.029475, false);

UbuduPoint pointA = map.getCartesianCoordinates(coordsA);
UbuduPoint pointB = map.getCartesianCoordinates(coordsB);

List<UbuduPoint> path = map.getPathForPoints(pointA, pointB);

UbuduPoint is a point in cartesian coordinates. Each UbuduPoint can be converted to geographical coordinates (UbuduCoordinates2D) using UbuduMap instance:

UbuduCoordinates2D mGeoCoordinates = map.getGeoCoordinates(mUbuduPoint);

Clone this wiki locally