difference between desiredAccuracy and distanceFilter

前端 未结 2 1710
猫巷女王i
猫巷女王i 2021-02-15 16:28

Sorry for being a noob here. I am not able to clearly differentiate between CLLocationManager\'s properties distanceFilter and desiredAccuracy.

2条回答
  •  失恋的感觉
    2021-02-15 17:08

    distanceFilter - this is minimal distance which device should pass from previous location which was passed to delegate with ...didUpdateToLocation:... method. And as soon as distance reached location service will invoke ...didUpdateToLocation... again and so on.

    desiredAccuracy - tells to location service how accurate coordinate you want and this is minimal location error radius. If value is very low (ex. 5) radio will try to use GPS hardware and will keep powering it up hardly to make it give most accurate location. If value is large,than system may decide to use data which was retrieved from WiFi hotspots location triangulation.

提交回复
热议问题