Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

[iOS] Annotations are not selectable (added via iosapp menu) #15106

Closed

Description

@julianrex

This appears to be separate from #15097, and may be a duplicate of #15088.

Reproduction steps:

  1. Run iosapp
  2. From the menu, select "Add 100 Views" (or sprites)
  3. Do not interact with the map (pinch/pan/rotate)
  4. Tap on one of the annotation views. Note that it is not selected, and the map's gesture recognizer fires and hides/shows the navigation bar at the top.

This is happening because these vectors

std::vector<QueryResult> features = collisionGrid.queryWithBoxes(envelope);
std::vector<QueryResult> ignoredFeatures = ignoredGrid.queryWithBoxes(envelope);
features.insert(features.end(), ignoredFeatures.begin(), ignoredFeatures.end());

have zero size. This means an annotation is not detected, and the select tap gesture is stopped from recognizing.

Screen Shot 2019-07-11 at 5 04 33 PM

If you move the map around you will eventually be able to select the annotations.


Note: a similar query, in the same frame, (that uses a much larger rect, larger than the viewport) returns all 100 annotations. It does look like that's a different mbgl::Placement instance...

Yep, these lines fire:

bool symbolBucketsChanged = false;
const bool placementChanged = !placement->stillRecent(updateParameters.timePoint);
std::set<std::string> usedSymbolLayers;
if (placementChanged) {
placement = std::make_unique<Placement>(
updateParameters.transformState, updateParameters.mode,
updateParameters.transitionOptions, updateParameters.crossSourceCollisions,
std::move(placement));
}

/cc @pozdnyakov @astojilj

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Corebughigh priorityiOS

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions