Return-Path: X-Original-To: apmail-cordova-commits-archive@www.apache.org Delivered-To: apmail-cordova-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 431D4118CA for ; Fri, 27 Jun 2014 18:23:08 +0000 (UTC) Received: (qmail 93000 invoked by uid 500); 27 Jun 2014 18:23:08 -0000 Delivered-To: apmail-cordova-commits-archive@cordova.apache.org Received: (qmail 92975 invoked by uid 500); 27 Jun 2014 18:23:08 -0000 Mailing-List: contact commits-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list commits@cordova.apache.org Received: (qmail 92961 invoked by uid 99); 27 Jun 2014 18:23:08 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Jun 2014 18:23:08 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id C840398F712; Fri, 27 Jun 2014 18:23:07 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: agrieve@apache.org To: commits@cordova.apache.org Message-Id: <988d2bc4b052418db903228c7a3ec999@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: git commit: ios: Changed distanceFilter from none to 5 meters, prevents it from spamming the callback even though nothing changed. Date: Fri, 27 Jun 2014 18:23:07 +0000 (UTC) Repository: cordova-plugin-geolocation Updated Branches: refs/heads/master ae97461f5 -> 6d413ad9d ios: Changed distanceFilter from none to 5 meters, prevents it from spamming the callback even though nothing changed. close #16 Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/commit/6d413ad9 Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/tree/6d413ad9 Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/diff/6d413ad9 Branch: refs/heads/master Commit: 6d413ad9dc8770b1c45b089cb10f8f7b474d6501 Parents: ae97461 Author: elbarto132 Authored: Mon Apr 7 15:22:12 2014 +0200 Committer: Andrew Grieve Committed: Fri Jun 27 14:22:49 2014 -0400 ---------------------------------------------------------------------- src/ios/CDVLocation.m | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/blob/6d413ad9/src/ios/CDVLocation.m ---------------------------------------------------------------------- diff --git a/src/ios/CDVLocation.m b/src/ios/CDVLocation.m index d52b03d..3f8679b 100644 --- a/src/ios/CDVLocation.m +++ b/src/ios/CDVLocation.m @@ -132,8 +132,9 @@ __locationStarted = YES; if (enableHighAccuracy) { __highAccuracyEnabled = YES; - // Set to distance filter to "none" - which should be the minimum for best results. - self.locationManager.distanceFilter = kCLDistanceFilterNone; + // Set distance filter to 5 for a high accuracy. Setting it to "kCLDistanceFilterNone" could provide a + // higher accuracy, but it's also just spamming the callback with useless reports which drain the battery. + self.locationManager.distanceFilter = 5; // Set desired accuracy to Best. self.locationManager.desiredAccuracy = kCLLocationAccuracyBest; } else {