diff --git a/CHANGELOG.md b/CHANGELOG.md index 5867b2d13..45b1959a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## 0.5.1 + +### iOS + +- Added support for CocoaPods 0.38.0. ([#1876](https://github.com/mapbox/mapbox-gl-native/pull/1876)) + ## 0.5.0 ### Core diff --git a/include/mbgl/map/map.hpp b/include/mbgl/map/map.hpp index d31d6a275..82aef65b6 100644 --- a/include/mbgl/map/map.hpp +++ b/include/mbgl/map/map.hpp @@ -67,7 +67,10 @@ public: void renderStill(StillImageCallback callback); // Triggers a synchronous or asynchronous render. - void renderSync(); + bool renderSync(); + + // Nudges transitions one step, possibly notifying of the need for a rerender. + void nudgeTransitions(bool forceRerender); // Notifies the Map thread that the state has changed and an update might be necessary. void update(Update update = Update::Nothing); diff --git a/ios/MapboxGL.podspec b/ios/MapboxGL.podspec index 0e4d27be8..a49fb7deb 100644 --- a/ios/MapboxGL.podspec +++ b/ios/MapboxGL.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |m| m.name = 'MapboxGL' - m.version = '0.4.5-symbols' + m.version = '0.5.1' m.summary = 'Open source vector map solution for iOS with full styling capabilities.' m.description = 'Open source OpenGL-based vector map solution for iOS with full styling capabilities and Cocoa bindings.' diff --git a/platform/ios/MGLMapView.mm b/platform/ios/MGLMapView.mm index 6cb46e28a..e807d21c6 100644 --- a/platform/ios/MGLMapView.mm +++ b/platform/ios/MGLMapView.mm @@ -703,9 +703,11 @@ std::chrono::steady_clock::duration secondsAsDuration(float duration) _mbglMap->setSourceTileCacheSize(cacheSize); - _mbglMap->renderSync(); + bool needsRerender = _mbglMap->renderSync(); [self updateUserLocationAnnotationView]; + + _mbglMap->nudgeTransitions(needsRerender); } } diff --git a/src/mbgl/map/map.cpp b/src/mbgl/map/map.cpp index 0e58a2912..d983a9c51 100644 --- a/src/mbgl/map/map.cpp +++ b/src/mbgl/map/map.cpp @@ -48,7 +48,7 @@ void Map::renderStill(StillImageCallback callback) { FrameData{ view.getFramebufferSize() }, callback); } -void Map::renderSync() { +bool Map::renderSync() { if (renderState == RenderState::never) { view.notifyMapChange(MapChangeWillStartRenderingMap); } @@ -69,9 +69,13 @@ void Map::renderSync() { view.notifyMapChange(MapChangeDidFinishRenderingMapFullyRendered); } + return result.needsRerender; +} + +void Map::nudgeTransitions(bool forceRerender) { if (transform->needsTransition()) { update(Update(transform->updateTransitions(Clock::now()))); - } else if (result.needsRerender) { + } else if (forceRerender) { update(); } }