diff options
author | Gali Nelle <galinelle.mapbox@gmail.com> | 2020-04-15 18:15:29 +0300 |
---|---|---|
committer | galinelle <paolo.angelelli@mapbox.com> | 2020-04-17 22:26:32 +0300 |
commit | fea8a83e7f72ba59e41e713b3a37f6b946565d74 (patch) | |
tree | a1ca136e4d33d63f9ffb07cf6aa107c331ace992 /platform | |
parent | c4b061bd959a0efa5d0202d16d39e92e4f416abb (diff) | |
download | qtlocation-mapboxgl-fea8a83e7f72ba59e41e713b3a37f6b946565d74.tar.gz |
Introduce a mean to add render features in layers with no sources
This change also uses the support in the LocationIndicator layer, to
return a point feature when queried in correspondence of the location
indicator.
Diffstat (limited to 'platform')
-rw-r--r-- | platform/glfw/glfw_view.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/platform/glfw/glfw_view.cpp b/platform/glfw/glfw_view.cpp index 06f435e4dd..0ff208586e 100644 --- a/platform/glfw/glfw_view.cpp +++ b/platform/glfw/glfw_view.cpp @@ -294,6 +294,11 @@ void GLFWView::onKey(GLFWwindow *window, int key, int /*scancode*/, int action, case GLFW_KEY_Q: { auto result = view->rendererFrontend->getRenderer()->queryPointAnnotations({ {}, { double(view->getSize().width), double(view->getSize().height) } }); printf("visible point annotations: %lu\n", result.size()); + auto features = view->rendererFrontend->getRenderer()->queryRenderedFeatures( + mbgl::ScreenBox{{double(view->getSize().width * 0.5), double(view->getSize().height * 0.5)}, + {double(view->getSize().width * 0.5 + 1), double(view->getSize().height * 0.5 + 1)}}, + {}); + printf("Rendered features at the center of the screen: %lu\n", features.size()); } break; case GLFW_KEY_P: view->pauseResumeCallback(); |