Open koendecock opened 1 year ago
I would recommend looking at the code and trying to debug this. It might be that this is what we configure the iOS provider and still get too close locations.
Hi @HarelM, thanks for your reply but I'm not familiar at all with IOS code. I'm using cordova to be able to write native application with my JS, HTML, CSS and React JS skills ;-) I was hoping someone with IOS code skills and knowledge on this great plugin could take a look at this issue.
You should be able to open xcode and connect the device to be able to debug you app. You can also try and investigate the plugin's logs. Worst case, you can use the raw provider and filter the locations yourself.
Describe the bug I'm testing this great plugin on my IOS device. I've set stationaryRadius and distanceFilter to 50 but I'm receiving location events for locations which are less than 3 meters separated. My understanding of the documentation is that I should only get location events when the distance to the previous location is more than 50 meters.
This is my configuration: BackgroundGeolocation.configure({ locationProvider: BackgroundGeolocation.DISTANCE_FILTER_PROVIDER, //locationProvider: BackgroundGeolocation.RAW_PROVIDER, desiredAccuracy: BackgroundGeolocation.HIGH_ACCURACY, stationaryRadius: 50, distanceFilter: 50, notificationTitle: 'Background tracking', notificationText: 'enabled', debug: false, interval: 10000, fastestInterval: 5000, activitiesInterval: 10000, url: 'http://192.168.81.15:3000/location', httpHeaders: { 'X-FOO': 'bar' }, // customize post properties postTemplate: { lat: '@latitude', lon: '@longitude', foo: 'bar' // you can also add your own properties } });
Expected behavior I expect the receive locations events when the user has moved at least 50 meters.
Screenshots I've attached a screenshot showing the distance to the previous location in meters for each location in the getValidLocations() list. I calculated the distance between two locations with the open layers getDistance function (https://openlayers.org/en/latest/apidoc/module-ol_sphere.html#.getDistance).
Smartphone (please complete the following information):
Additional context
Add any other context about the problem here.