summaryrefslogtreecommitdiff
path: root/platform/default
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2016-10-22 20:09:33 +0300
committerBruno de Oliveira Abinader <bruno@mapbox.com>2016-10-25 08:12:31 +0300
commit72df1658facac0e45d5b519422a638ffb9bf2b60 (patch)
tree2c327432178a507109be49c0470244f3450f2898 /platform/default
parente55065e62a2e3b1707ac8ffa09e6b08b928e07c1 (diff)
downloadqtlocation-mapboxgl-72df1658facac0e45d5b519422a638ffb9bf2b60.tar.gz
[glfw] Added queryPointAnnotations shortcut
Diffstat (limited to 'platform/default')
-rw-r--r--platform/default/glfw_view.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/platform/default/glfw_view.cpp b/platform/default/glfw_view.cpp
index 28789e4a67..9c54fc4ebf 100644
--- a/platform/default/glfw_view.cpp
+++ b/platform/default/glfw_view.cpp
@@ -178,7 +178,11 @@ void GLFWView::onKey(GLFWwindow *window, int key, int /*scancode*/, int action,
case GLFW_KEY_Z:
view->nextOrientation();
break;
- case GLFW_KEY_Q:
+ case GLFW_KEY_Q: {
+ auto result = view->map->queryPointAnnotations({ {}, { double(view->getSize()[0]), double(view->getSize()[1]) } });
+ printf("visible point annotations: %lu\n", result.size());
+ } break;
+ case GLFW_KEY_C:
view->clearAnnotations();
break;
case GLFW_KEY_P: