From 4009b2c556e18a1a4be4b14a431334ac90b8a05f Mon Sep 17 00:00:00 2001 From: Alex Zolotarev Date: Tue, 7 Feb 2012 17:10:46 +0300 Subject: [PATCH] [ios] Closes #534 - compass in search is not working when my position was enabled on the main map. The problem was that location manager didn't correctly added more than one observers --- iphone/Maps/Platform/LocationManager.mm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/iphone/Maps/Platform/LocationManager.mm b/iphone/Maps/Platform/LocationManager.mm index 1083bf3caf..e193390c79 100644 --- a/iphone/Maps/Platform/LocationManager.mm +++ b/iphone/Maps/Platform/LocationManager.mm @@ -58,14 +58,17 @@ [observer onLocationStatusChanged:location::ENotSupported]; } else + { + [m_observers addObject:observer]; [observer onLocationStatusChanged:location::EStarted]; + } } - (void)stop:(id )observer { + [m_observers removeObject:observer]; if (m_isStarted) { - [m_observers removeObject:observer]; if ([m_observers count] == 0) { // stop only if no more observers are subsribed m_isStarted = NO;