Hub Location

The last known hub location.

The location is updated sporadically while the hub is connected. When it gets disconnected, the current location is stored. If you want to receive continous location updates, use mobile.location.

const onHubLocationChange = (value: Placemark, timestamp?: Date) => {
    console.log(value, timestamp);
};


COBI.app.hubLocation.read(onHubLocationChange); // Instantly get the current value
COBI.app.hubLocation.subscribe(onHubLocationChange);
COBI.app.hubLocation.unsubscribe(onHubLocationChange);
Example Response
{
    "name": "Test",
    "address": "Some address",
    "category": "NONE",
    "coordinate": {
        "latitude": 0.0,
        "longitude": 0.0
    }
}

Last updated