Not able to update geolocaton continous

From my testing I am not able to update my current location. First time when the app is started locaton is set ok, but I want to update my locaiton regularely.

Testet on:
Fusetools: 0.35.0 (Build 10867) IOS: 9.3.2 (13F69), emulator: 10.2 (14C89)

var location = Observable(GeoLocation.location);

var timeoutMs = 3000;

GeoLocation.getLocation(timeoutMs).then(function (loc) {
    location.value = loc;
}).catch(function (error) {
    debugger;
    showError.value = true;
    errorMessage.value = err.message;
});


GeoLocation.onChanged = function (loc) {
    location.value = loc;
}

GeoLocation.onError = function (error) {
}

function startContinousListener () {
    var intervalMs = 10000;
    var desiredAccuracyInMeters = 10;
    GeoLocation.startListening(intervalMs, desiredAccuracyInMeters);
}

startContinousListener();

function stopContinousListener () {
    GeoLocation.stopListener();
}

According to the docs the handlers are changed / error rather than onChanged & onError

Does not help to change to changed and error.

When I change location in the emulator (from Apple to bicycle ride etc.) Fuse throws an exception:

Error message: uncaugth, unspecified “error” event.

kCLEErrordomain error: 0
Filename: FuseJS/EventEmitter.js
LineNumber: 228
JS stacj trace: emit@FuseJS/ EventEmitter.js 228:15

Ah sorry, turns out I have no clue about how we deal with event emitters. :-S

  • Your initial attempt with onChanged should have worked, however: it’s not the recommended approach.

  • If you could instead try GeoLocation.on("changed", <callback function>) or to observe the event (as described in the docs ) that’d help us work out how broken the functionality is. :slight_smile:

GeoLocation.on(“changed”, ) seems to work.

Ah, that’s great then!

It is still a problem.

This error is related::
https://www.fusetools.com/community/forums/general/changing_location_in_ios_emulator_crashes_the_app

Is there still a problem if you use an error handler?