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

Map::queryPointAnnotations returns empty #8799

Closed
tobrun opened this issue Apr 24, 2017 · 3 comments
Closed

Map::queryPointAnnotations returns empty #8799

tobrun opened this issue Apr 24, 2017 · 3 comments
Labels
Core The cross-platform C++ core, aka mbgl

Comments

@tobrun
Copy link
Member

tobrun commented Apr 24, 2017

Map::queryPointAnnotations occasionally returns a 0 size when point annotations are found in the current viewport. For MarkerViews this results in flickering as they are removed/readded based on the results coming from Map::queryPointAnnotations.

ezgif com-video-to-gif 42

Example output from gif above:

E/MarkerViewManager: MarkerViews in rect 2
E/MarkerViewManager: MarkerViews in rect 0
E/MarkerViewManager: MarkerViews in rect 2
E/MarkerViewManager: MarkerViews in rect 2
E/MarkerViewManager: MarkerViews in rect 2
E/MarkerViewManager: MarkerViews in rect 2
E/MarkerViewManager: MarkerViews in rect 2
E/MarkerViewManager: MarkerViews in rect 2
E/MarkerViewManager: MarkerViews in rect 0
E/MarkerViewManager: MarkerViews in rect 2
E/MarkerViewManager: MarkerViews in rect 2
E/MarkerViewManager: MarkerViews in rect 2
E/MarkerViewManager: MarkerViews in rect 0
E/MarkerViewManager: MarkerViews in rect 2
E/MarkerViewManager: MarkerViews in rect 2
E/MarkerViewManager: MarkerViews in rect 2

This issue is a follow up from #8367 and it's possible that the root problem could be related to #6762.

@tobrun tobrun changed the title Map::queryPointAnnotations returns empty when it shouldn Map::queryPointAnnotations returns empty Apr 24, 2017
@tobrun tobrun added the Core The cross-platform C++ core, aka mbgl label Apr 24, 2017
@tobrun tobrun added this to the android-v5.1.0 milestone Apr 24, 2017
@tobrun
Copy link
Member Author

tobrun commented Apr 24, 2017

I replaced the MarkerView with Marker (PointAnnotation). While the marker itself doesn't flicker, I'm seeing similar output when it comes to Map::queryPointAnnotations.

E/AnnotationManager: Markers in rect 1
E/AnnotationManager: Markers in rect 0
E/AnnotationManager: Markers in rect 1
E/AnnotationManager: Markers in rect 0
E/AnnotationManager: Markers in rect 1
E/AnnotationManager: Markers in rect 1
E/AnnotationManager: Markers in rect 0
E/AnnotationManager: Markers in rect 0
E/AnnotationManager: Markers in rect 1
E/AnnotationManager: Markers in rect 1
E/AnnotationManager: Markers in rect 1
E/AnnotationManager: Markers in rect 0
E/AnnotationManager: Markers in rect 1
E/AnnotationManager: Markers in rect 0
E/AnnotationManager: Markers in rect 0
E/AnnotationManager: Markers in rect 1
E/AnnotationManager: Markers in rect 0

I'm thinking that this could be related to the asynchronous behaviour of adding markers (a marker will only be available to query until it has been rendered) and that updating the position shows the same issue.

@ChrisLoer
Copy link
Contributor

@tobrun How easy is this to reproduce? It would be good to test now that the fix for #10778 has gone into master. This issue was reported before we introduced the problem in #10778, but the code has changed enough we may have incidentally fixed the problem. If not, I can investigate.

@tobrun
Copy link
Member Author

tobrun commented Jan 19, 2018

quick test didn't show the issue. Closing!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Core The cross-platform C++ core, aka mbgl
Projects
None yet
Development

No branches or pull requests

3 participants