summaryrefslogtreecommitdiff
path: root/platform/macos/src/MGLMapView.mm
diff options
context:
space:
mode:
authorChris Loer <chris.loer@gmail.com>2018-12-06 13:31:42 +0200
committerChris Loer <chris.loer@mapbox.com>2018-12-11 11:46:16 -0800
commit70c2d5a4cabcd87bc4e6e564fcd6dfa10bd4c521 (patch)
tree5e514c52d9709d3f89263f53dd005aa7287e9b00 /platform/macos/src/MGLMapView.mm
parent13e117b5016769f77dc6b3d3023f6c068e5a92ff (diff)
downloadqtlocation-mapboxgl-70c2d5a4cabcd87bc4e6e564fcd6dfa10bd4c521.tar.gz
[core, darwin, android] Add onDidEnterIdle to MapObserver.
didEnterIdle fires whenever render completes and no repaint is scheduled.
Diffstat (limited to 'platform/macos/src/MGLMapView.mm')
-rw-r--r--platform/macos/src/MGLMapView.mm14
1 files changed, 14 insertions, 0 deletions
diff --git a/platform/macos/src/MGLMapView.mm b/platform/macos/src/MGLMapView.mm
index 2f379ab406..eb877216d2 100644
--- a/platform/macos/src/MGLMapView.mm
+++ b/platform/macos/src/MGLMapView.mm
@@ -934,6 +934,16 @@ public:
}
}
+- (void)mapViewDidEnterIdle {
+ if (!_mbglMap) {
+ return;
+ }
+
+ if ([self.delegate respondsToSelector:@selector(mapViewDidEnterIdle)]) {
+ [self.delegate mapViewDidEnterIdle:self];
+ }
+}
+
- (void)mapViewDidFinishLoadingStyle {
if (!_mbglMap) {
return;
@@ -3050,6 +3060,10 @@ public:
bool fullyRendered = mode == mbgl::MapObserver::RenderMode::Full;
[nativeView mapViewDidFinishRenderingMapFullyRendered:fullyRendered];
}
+
+ void onDidEnterIdle() override {
+ [nativeView mapViewDidEnterIdle];
+ }
void onDidFinishLoadingStyle() override {
[nativeView mapViewDidFinishLoadingStyle];