-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Replace getPointAnnotationsInBounds() w/ queryPointAnnotations() #5165
Conversation
This isn’t going to work: annotation views on iOS and marker views on Android work by inserting a point annotation that has no icon and is thus prevented from rendering at the GL level. But as the name suggests, This approach will only work if we use |
It would be possible to hack around the issue by setting each annotation/marker view’s icon to a single transparent pixel. It’s unclear to me whether handling rotation and pitch is important enough to use such a hack. |
ids.reserve(features.size()); | ||
std::transform(features.begin(), features.end(), std::back_inserter(ids), [](auto& feature) -> AnnotationID { | ||
assert(feature.id); | ||
assert(*feature.id <= UINT32_MAX); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assert(*feature.id <= std::numeric_limits<AnnotationID>::max())
9cec3c0
to
fb29dc8
Compare
fb29dc8
to
112e2fc
Compare
… queryPointAnnotations() queryPointAnnotations() accepts a screen rectangle instead of a geographic bounding box, so marker hit testing works at the edges of a rotated, tilted map view. Fixes #5151.
112e2fc
to
3f41757
Compare
The issue in #5165 (comment) was resolved by associating every view-backed annotation with a spacer image: #5509. |
queryPointAnnotations()
accepts a screen rectangle instead of a geographic bounding box. If you pass in the bounds (in screen coordinates) of a rotated, tilted map view, the query is restricted to the trapezoidal region visible in the map view.Fixes #5151.
@jfirebaugh to review the C++ side. @tobrun to review the Java side, which I edited blind without a Java IDE. 😬