This repository has been archived by the owner on Aug 8, 2023. It is now read-only.
Automatically query point annotations in region when region changes #4694
Labels
Android
Mapbox Maps SDK for Android
performance
Speed, stability, CPU usage, memory usage, or power usage
Along the lines of #4384, mbgl should automatically call
Map::getPointAnnotationsInBounds()
within the visible region whenever the region changes and include the resulting annotation IDs in the region change notification. The query would only take place if client code registers for it somehow.This additional context would greatly speed up tooltip and cursor rect calculations in the OS X SDK. It would also be important for implementing annotations as native views (#1784, #3276) while still relying on
mbgl::AnnotationManager
to manage the locations of those views.Per #4693 (comment), it might also be desirable for the SDK to optionally expose this information in its delegate callbacks, to allow the developer to lazily load information related to the current viewport.
/cc @tobrun @boundsj
The text was updated successfully, but these errors were encountered: