Hi, we want to react to location changes. We currently collect mapView.locationDisplay.location which works well but the flow is also collected when the location remains the same - and we want to catch changes. Is there a way to do that using the API? Or do we have to validate changes manually using a variable to compare the previous location state to the current?
Solved! Go to Solution.
You may construct a new SystemLocationDataSource to replace the default one. In the new SystemLocationDataSource, you could specify the minimum time updating interval and distance tolerance, which will filter out the locations not changed much beyond the tolerance.
You may construct a new SystemLocationDataSource to replace the default one. In the new SystemLocationDataSource, you could specify the minimum time updating interval and distance tolerance, which will filter out the locations not changed much beyond the tolerance.
Thank you @ChanganShi1, that is a very nice solution. Nevertheless, we found a Flow based way to avoid events when the position does not change: