Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/iphone
diff options
context:
space:
mode:
authorAleksey Belouosv <aleksey@maps.me>2019-02-05 16:56:59 +0300
committerAleksey Belousov <beloal@users.noreply.github.com>2019-03-01 18:28:21 +0300
commit96fdef721fd5302ef18d99e5dc855a098eee16d3 (patch)
treeff7779a62478de0efd1a512c025f5405e7c5742a /iphone
parentdef70d85d9a82bd19dbee1475bb1f5113a02db94 (diff)
[iOS] adjust geo tracker params
Diffstat (limited to 'iphone')
-rw-r--r--iphone/Maps/Core/Location/GeoTracker/Impl/GeoTracker.swift2
-rw-r--r--iphone/Maps/Core/Location/GeoTracker/Impl/GeoZoneTracker.swift5
2 files changed, 4 insertions, 3 deletions
diff --git a/iphone/Maps/Core/Location/GeoTracker/Impl/GeoTracker.swift b/iphone/Maps/Core/Location/GeoTracker/Impl/GeoTracker.swift
index 99421f35e8..a0e4c7ad83 100644
--- a/iphone/Maps/Core/Location/GeoTracker/Impl/GeoTracker.swift
+++ b/iphone/Maps/Core/Location/GeoTracker/Impl/GeoTracker.swift
@@ -41,7 +41,7 @@ extension GeoTracker: CLLocationManagerDelegate {
zones.forEach {
locationManager.startMonitoring(
for: CLCircularRegion(center: CLLocationCoordinate2DMake($0.latitude, $0.longitude),
- radius: 20,
+ radius: 100,
identifier: $0.identifier))
}
trackingZones = zones.reduce(into: [:]) { $0[$1.identifier] = $1 }
diff --git a/iphone/Maps/Core/Location/GeoTracker/Impl/GeoZoneTracker.swift b/iphone/Maps/Core/Location/GeoTracker/Impl/GeoZoneTracker.swift
index 9816a7033a..85ff4845be 100644
--- a/iphone/Maps/Core/Location/GeoTracker/Impl/GeoZoneTracker.swift
+++ b/iphone/Maps/Core/Location/GeoTracker/Impl/GeoZoneTracker.swift
@@ -6,13 +6,14 @@ class GeoZoneTracker: NSObject {
init(_ zone: IMWMGeoTrackerZone, trackerCore: IMWMGeoTrackerCore) {
self.geoZone = zone
self.trackerCore = trackerCore
- locationManager.desiredAccuracy = kCLLocationAccuracyNearestTenMeters
+ locationManager.desiredAccuracy = kCLLocationAccuracyHundredMeters
locationManager.distanceFilter = 10
super.init()
locationManager.delegate = self
}
deinit {
+ stopTracking()
locationManager.delegate = nil
}
@@ -28,7 +29,7 @@ class GeoZoneTracker: NSObject {
extension GeoZoneTracker: CLLocationManagerDelegate {
func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) {
if let visitedLocation = locations.filter({
- $0.horizontalAccuracy <= 20 &&
+ $0.horizontalAccuracy <= 30 &&
$0.distance(from: CLLocation(latitude: geoZone.latitude, longitude: geoZone.longitude)) <= 20
}).first {
trackerCore.logEnter(geoZone, location: visitedLocation)