RSS-Feed

David Hadizadeh

E-Mail

Xing-Profil

LinkedIn

Impressum

 




Points instead of IDs (Mapped position manager)

07.05.2015

If you do not want to save and receive IDs for positions you can use an alternative positionManager: MappedPositionManager.
The MappedPositionManager works the same way but takes and will send MappingPoints. A MappingPoint consist of X, Y and Z coordiantes so you can handle the positions in a coordinate system.

To initialize the MappedPositionManager you can use this code:

1
MappedPositionManager mappedPositionManager = new MappedPositionManager(file);

The class which receives the positions has to implement the interface MappedPositionListener instead of the default one (PositionListener).

1
2
3
4
5
6
7
public class Map extends Activity implements MappedPositionListener {
 
    @Override
    public void positionReceived(MappingPoint mappingPoint) {
        // TODO
    }
}

Here you can see how to map a position:

1
mappedPositionManager.map(new MappingPoint(xValue, yValue, zValue));

Kategorie: Indoor-Positioning Addons |


Impressum