[ios, macos] Add selection support to MGLMultiPoint annotations. (#9984)
* [ios, macos] Add selection support to MGLMultiPoint annotations. * [ios, macos] Update changelogs.
This commit is contained in:
committed by
GitHub
parent
24fc48982a
commit
b7b8baef9d
@@ -57,6 +57,21 @@ AnnotationIDs Renderer::queryPointAnnotations(const ScreenBox& box) const {
|
||||
RenderedQueryOptions options;
|
||||
options.layerIDs = {{ AnnotationManager::PointLayerID }};
|
||||
auto features = queryRenderedFeatures(box, options);
|
||||
return getAnnotationIDs(features);
|
||||
}
|
||||
|
||||
AnnotationIDs Renderer::queryShapeAnnotations(const ScreenBox& box) const {
|
||||
auto features = impl->queryShapeAnnotations({
|
||||
box.min,
|
||||
{box.max.x, box.min.y},
|
||||
box.max,
|
||||
{box.min.x, box.max.y},
|
||||
box.min
|
||||
});
|
||||
return getAnnotationIDs(features);
|
||||
}
|
||||
|
||||
AnnotationIDs Renderer::getAnnotationIDs(const std::vector<Feature>& features) const {
|
||||
std::set<AnnotationID> set;
|
||||
for (auto &feature : features) {
|
||||
assert(feature.id);
|
||||
|
||||
Reference in New Issue
Block a user