[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:
Fabian Guerra Soto
2017-10-18 15:18:54 -04:00
committed by GitHub
parent 24fc48982a
commit b7b8baef9d
12 changed files with 167 additions and 66 deletions

View File

@@ -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);