forked from organicmaps/organicmaps
[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
This commit is contained in:
parent
1dd6e78eb4
commit
4009b2c556
1 changed files with 4 additions and 1 deletions
|
@ -58,14 +58,17 @@
|
|||
[observer onLocationStatusChanged:location::ENotSupported];
|
||||
}
|
||||
else
|
||||
{
|
||||
[m_observers addObject:observer];
|
||||
[observer onLocationStatusChanged:location::EStarted];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)stop:(id <LocationObserver>)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;
|
||||
|
|
Loading…
Add table
Reference in a new issue