summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2015-07-14 10:49:52 -0700
committerMinh Nguyễn <mxn@1ec5.org>2015-07-14 10:49:52 -0700
commit1f78d285160785c8c8fff3806b38f3ae9d0e312d (patch)
tree61ce13f60aef7c85bce892fa15f14abfc84c39bd
parentbef3e1590b38217d71cb519b2304d52efa5885fe (diff)
parentf5e38ee21a0d6db9e7d21bf4e904b5e76789c9bd (diff)
downloadqtlocation-mapboxgl-1f78d285160785c8c8fff3806b38f3ae9d0e312d.tar.gz
Merge branch 'release-v0.5.0'
-rw-r--r--CHANGELOG.md6
-rw-r--r--include/mbgl/map/map.hpp5
-rw-r--r--ios/MapboxGL.podspec2
-rw-r--r--platform/ios/MGLMapView.mm4
-rw-r--r--src/mbgl/map/map.cpp8
5 files changed, 20 insertions, 5 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5867b2d138..45b1959a45 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 d31d6a2757..82aef65b65 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 0e4d27be83..a49fb7deb5 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 6cb46e28a9..e807d21c6d 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 0e58a2912d..d983a9c518 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();
}
}