diff --git a/common/glfw_view.cpp b/common/glfw_view.cpp index 9590cc5e7..3cc50b591 100644 --- a/common/glfw_view.cpp +++ b/common/glfw_view.cpp @@ -273,5 +273,9 @@ void show_color_debug_image(std::string name, const char *data, size_t logical_w glfwMakeContextCurrent(current_window); } +void notify_map_change() { + // no-op +} + } } diff --git a/include/llmr/platform/platform.hpp b/include/llmr/platform/platform.hpp index 62fa1badc..972e7db6b 100644 --- a/include/llmr/platform/platform.hpp +++ b/include/llmr/platform/platform.hpp @@ -32,6 +32,9 @@ std::shared_ptr request_http(const std::string &url, // Cancels an HTTP request. void cancel_request_http(const std::shared_ptr &req); +// Notifies a watcher of map x/y/scale/rotation changes. +void notify_map_change(); + // Shows an alpha image with the specified dimensions in a named window. void show_debug_image(std::string name, const char *data, size_t width, size_t height); diff --git a/ios/MVKMapKit b/ios/MVKMapKit index 38fabc640..8b7e61545 160000 --- a/ios/MVKMapKit +++ b/ios/MVKMapKit @@ -1 +1 @@ -Subproject commit 38fabc640b3311d45a06aa746f9106db7c7630dd +Subproject commit 8b7e61545a504e71c59bc22b9f5bad22248c8980 diff --git a/src/map/transform.cpp b/src/map/transform.cpp index 2382cac88..996117bfa 100644 --- a/src/map/transform.cpp +++ b/src/map/transform.cpp @@ -35,6 +35,7 @@ bool Transform::resize(const uint16_t w, const uint16_t h, const float ratio, current.framebuffer[1] = final.framebuffer[1] = fb_h; if (!canRotate()) _setAngle(0); constrain(current.scale, current.y); + platform::notify_map_change(); return true; } else { return false; @@ -74,6 +75,8 @@ void Transform::_moveBy(const double dx, const double dy, const time duration) { transitions.emplace_front( std::make_shared>(current.y, final.y, current.y, start, duration)); } + + platform::notify_map_change(); } void Transform::setLonLat(const double lon, const double lat, const time duration) { @@ -290,6 +293,8 @@ void Transform::_setScaleXY(const double new_scale, const double xn, const doubl zc = s / 2; Bc = s / 360; Cc = s / (2 * M_PI); + + platform::notify_map_change(); } #pragma mark - Constraints @@ -390,6 +395,8 @@ void Transform::_setAngle(double new_angle, const time duration, bool disable_in transitions.emplace_front(interaction_timeout); } } + + platform::notify_map_change(); } double Transform::getAngle() const {