Event trigger based on coordinates


#1

Hi!

May I know if Location Beacon is able to trigger events to a mobile app based on the coordinates?


#2

Sure thing! You could do something like this:

let coffeeMachine = EILPoint(x: 3.1, y: 7.2)

// ...

func indoorLocationManager(manager: EILIndoorLocationManager,
        didUpdatePosition position: EILOrientedPoint, // ...

    if position.distanceToPoint(coffeeMachine) < 5 {
        // start brewing coffee
    }
}