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

AnnotationTileLayer vends its own name #5163

Merged
merged 1 commit into from
May 26, 2016
Merged

Conversation

1ec5
Copy link
Contributor

@1ec5 1ec5 commented May 26, 2016

Fixes #5159.

@jfirebaugh, any idea why no features are returned in the test? When I put this fix into my branch in #5110, annotation features are returned by queryRenderedFeatures().

@1ec5 1ec5 added crash Core The cross-platform C++ core, aka mbgl labels May 26, 2016
@1ec5 1ec5 added this to the ios-v3.3.0 milestone May 26, 2016
@1ec5 1ec5 self-assigned this May 26, 2016
@jfirebaugh
Copy link
Contributor

My guess is that it's because the map isn't rendered before calling queryRenderedFeatures, and AnnotationManager has some behavior, largely leftover from pre-main-thread-Map days, where it doesn't actually modify the style until the map is rendered.

@1ec5 1ec5 force-pushed the 1ec5-query-annotation-5159 branch from b6b0b86 to c35d89b Compare May 26, 2016 19:29
@1ec5
Copy link
Contributor Author

1ec5 commented May 26, 2016

Adding an annotation does kick off an asynchronous update, but I guess this headless map would need a synchronous update. I added a test::render() call to kick it off. I think that’s reasonable for this particular test, since it’s query rendered features and the other annotation tests all render too.

@1ec5 1ec5 merged commit 8ace0d3 into master May 26, 2016
@1ec5 1ec5 deleted the 1ec5-query-annotation-5159 branch May 26, 2016 20:12
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 crash
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Assertion failure querying features in annotation tile — mbgl::FeatureIndex::addFeature()
2 participants