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

Monitor annotation tiles #2869

Merged
merged 4 commits into from
Oct 30, 2015
Merged

Monitor annotation tiles #2869

merged 4 commits into from
Oct 30, 2015

Conversation

jfirebaugh
Copy link
Contributor

Fixes #1688.

👀 @kkaefer

@jfirebaugh
Copy link
Contributor Author

The Annotations.NonImmediateAdd test case is not generating the expected results. Investigating.

@jfirebaugh
Copy link
Contributor Author

It's failing because TileWorker has a copy of the StyleLayers from before the shape layer is added.

@@ -91,11 +90,8 @@ void TileWorker::redoPlacement(
// Reset the collision tile so we have a clean slate; we're placing all features anyway.
collisionTile = std::make_unique<CollisionTile>(config);

for (auto i = layers.rbegin(); i != layers.rend(); i++) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kkaefer Do you see any issues here with iterating buckets directly, rather than layers?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, yeah, feature placement is order dependent, of course.

@jfirebaugh jfirebaugh force-pushed the 1688-monitor-annotation-tiles branch 2 times, most recently from f0d5948 to 8522c1f Compare October 30, 2015 00:18
@@ -287,6 +287,6 @@ void TileWorker::createSymbolBucket(const GeometryTileLayer& layer,

void TileWorker::insertBucket(const std::string& name, std::unique_ptr<Bucket> bucket) {
if (bucket->hasData()) {
result.buckets.emplace_back(name, std::move(bucket));
result.buckets.emplace(name, std::move(bucket));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we ever overwriting buckets here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so -- if we are, there's a bug in the bucket de-duping step. The name is the bucket name, which should be unique.

A tile may go from having particular layers, to not having them.
(Annotation tiles in particular.)
This fixes adding shape annotations after VectorTileData objects have
been created for annotations already, and will also be necessary for
the dynamic Style API.
@jfirebaugh jfirebaugh merged commit 8c3b3cb into master Oct 30, 2015
@jfirebaugh jfirebaugh deleted the 1688-monitor-annotation-tiles branch October 30, 2015 18:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants