Skip to content
Browse files

Run loop fix.

Reviewed by me.
  • Loading branch information...
1 parent 575f9a6 commit bbc93296100bd9af8400cb56c24d050d69419ede @tolmasky tolmasky committed May 4, 2010
Showing with 8 additions and 2 deletions.
  1. +8 −2 MKMapView.j
View
10 MKMapView.j
@@ -155,9 +155,11 @@
centerCoordinate = [self centerCoordinate];
if (!CLLocationCoordinate2DEqualToCLLocationCoordinate2D(centerCoordinate, newCenterCoordinate))
+ {
[self setCenterCoordinate:newCenterCoordinate];
- [[CPRunLoop currentRunLoop] limitDateForMode:CPDefaultRunLoopMode];
+ [[CPRunLoop currentRunLoop] limitDateForMode:CPDefaultRunLoopMode];
+ }
}
var updateZoomLevel = function()
@@ -166,9 +168,11 @@
zoomLevel = [self zoomLevel];
if (newZoomLevel !== zoomLevel)
+ {
[self setZoomLevel:newZoomLevel];
- [[CPRunLoop currentRunLoop] limitDateForMode:CPDefaultRunLoopMode];
+ [[CPRunLoop currentRunLoop] limitDateForMode:CPDefaultRunLoopMode];
+ }
}
google.maps.Event.addListener(m_map, "moveend", updateCenterCoordinate);
@@ -299,6 +303,8 @@
[self setCenterCoordinate:CLLocationCoordinate2DFromLatLng(aLatLng)];
[self setZoomLevel:7];
+
+ [[CPRunLoop currentRunLoop] limitDateForMode:CPDefaultRunLoopMode];
});
}

0 comments on commit bbc9329

Please sign in to comment.
Something went wrong with that request. Please try again.