summaryrefslogtreecommitdiff
path: root/platform/default
diff options
context:
space:
mode:
authorIvo van Dongen <info@ivovandongen.nl>2016-10-19 16:05:36 +0300
committerBruno de Oliveira Abinader <bruno@mapbox.com>2016-10-20 17:02:40 +0300
commitab85fdb4524788ce7279e8ac362a0c1edbd5d5df (patch)
tree7a6511e29020f20d07c4662e53671ad06b3d4b1d /platform/default
parent04a9a98b98d41312a687518fd43445a64dadadf0 (diff)
downloadqtlocation-mapboxgl-ab85fdb4524788ce7279e8ac362a0c1edbd5d5df.tar.gz
[glfw] add map change callback methods to glfw_view
Diffstat (limited to 'platform/default')
-rw-r--r--platform/default/glfw_view.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/platform/default/glfw_view.cpp b/platform/default/glfw_view.cpp
index fa5190c80c..28789e4a67 100644
--- a/platform/default/glfw_view.cpp
+++ b/platform/default/glfw_view.cpp
@@ -508,6 +508,16 @@ void GLFWView::setWindowTitle(const std::string& title) {
glfwSetWindowTitle(window, (std::string { "Mapbox GL: " } + title).c_str());
}
+void GLFWView::setMapChangeCallback(std::function<void(mbgl::MapChange)> callback) {
+ this->mapChangeCallback = callback;
+}
+
+void GLFWView::notifyMapChange(mbgl::MapChange change) {
+ if (mapChangeCallback) {
+ mapChangeCallback(change);
+ }
+}
+
namespace mbgl {
namespace platform {