diff options
author | Jesse Bounds <jesse@rebounds.net> | 2016-05-26 16:34:26 -0700 |
---|---|---|
committer | Jesse Bounds <jesse@rebounds.net> | 2016-06-07 14:56:41 -0700 |
commit | fe92d590bbe23748c691aa991f5608409a4b5924 (patch) | |
tree | 02584920e7eb5ec0c24d26f28975f3aeed463f80 /platform | |
parent | abe16952c6a4eedd8e258f53dee984a63048d0f4 (diff) | |
download | qtlocation-mapboxgl-fe92d590bbe23748c691aa991f5608409a4b5924.tar.gz |
[ios] Force update from display link when display link is created.
This forces the call of the map view's display link target when the
display link is created. When a map view is shown the first time
this is not required. However, if the display link was torn down
and then recreated due to the map view being removed / obscured in the
view hierarchy the map view delegate may expect to be informed when
the map view did finish loading the map when it is shown again.
This adds a call to `updateFromDisplayLink` just after a display link
is created which helps trigger a full refresh of the map in the sense
that all delegate methods get exercised including
`mapViewDidFinishLoadingMap`.
Diffstat (limited to 'platform')
-rw-r--r-- | platform/ios/src/MGLMapView.mm | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm index 359827ae61..57e59be10d 100644 --- a/platform/ios/src/MGLMapView.mm +++ b/platform/ios/src/MGLMapView.mm @@ -913,6 +913,7 @@ mbgl::Duration MGLDurationInSeconds(NSTimeInterval duration) _displayLink.frameInterval = MGLTargetFrameInterval; [_displayLink addToRunLoop:[NSRunLoop currentRunLoop] forMode:NSRunLoopCommonModes]; _needsDisplayRefresh = YES; + [self updateFromDisplayLink]; } else if ( ! isVisible && _displayLink) { |